Skip to content

Commit

Permalink
Small fixes about serial number
Browse files Browse the repository at this point in the history
  • Loading branch information
Breina committed Feb 22, 2024
1 parent 17f178c commit 75a9c76
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion custom_components/idrac_power/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
name=name,
manufacturer=manufacturer,
model=model,
sw_version=firmware_version
sw_version=firmware_version,
serial_number=serial
)

async_add_entities([
Expand Down
3 changes: 2 additions & 1 deletion custom_components/idrac_power/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
name=name,
manufacturer=manufacturer,
model=model,
sw_version=firmware_version
sw_version=firmware_version,
serial_number=serial
)

async_add_entities([
Expand Down
2 changes: 1 addition & 1 deletion custom_components/idrac_power/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def refresh_sensors_task():
await hass.async_add_executor_job(rest_client.update_power_usage)
await asyncio.sleep(rest_client.interval)

hass.async_create_background_task(refresh_sensors_task(), "Update iDRAC task")
hass.async_create_background_task(refresh_sensors_task(), f"Update {name} iDRAC task")


class IdracCurrentPowerSensor(SensorEntity):
Expand Down

0 comments on commit 75a9c76

Please sign in to comment.