Skip to content

Commit

Permalink
Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kgn3400 committed Apr 3, 2024
1 parent 19df6a3 commit 79d7a2f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions custom_components/docker_status/component_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ async def async_update(self) -> None:
if self.first_time:
await self.async_init()
self.first_time = False

await self.async_update_sensors_data()
await self.async_update_sensors_data(False)
else:
await self.async_update_sensors_data()

# ------------------------------------------------------------------
async def async_update_sensors_data(
Expand Down Expand Up @@ -265,6 +266,12 @@ async def async_init(self) -> None:
sensor.get(CONF_DOCKER_ENGINE_URL),
)

tmp_data.values[SENSOR_CONTAINERS_CPU_PERCENT] = 0.0
tmp_data.values_uom[SENSOR_CONTAINERS_CPU_PERCENT] = "%"

tmp_data.values[SENSOR_CONTAINERS_MEMORY_USAGE] = 0.0
tmp_data.values_uom[SENSOR_CONTAINERS_MEMORY_USAGE] = "B"

try:
tmp_data.client = await self.hass.async_add_executor_job(
docker.DockerClient, tmp_data.engine_url
Expand Down
2 changes: 1 addition & 1 deletion custom_components/docker_status/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"iot_class": "cloud_polling",
"requirements": ["docker==7.0.0"],
"ssdp": [],
"version": "1.0.4",
"version": "1.0.5",
"zeroconf": []
}
2 changes: 1 addition & 1 deletion custom_components/docker_status/hacs.json → hacs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Docker status",
"render_readme": true,
"homeassistant": "2023.3.0"
"homeassistant": "2024.3"
}

0 comments on commit 79d7a2f

Please sign in to comment.