Skip to content

Commit

Permalink
Merge pull request #14 from cbrherms/dev2
Browse files Browse the repository at this point in the history
Minor tweaks - uniqueness
  • Loading branch information
Breina committed Apr 30, 2024
2 parents e50141f + 21d0e5f commit 2c612dc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion custom_components/idrac_power/binary_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
serial = info[JSON_SERIAL_NUMBER]

device_info = DeviceInfo(
identifiers={('serial', serial)},
identifiers={(DOMAIN, serial)},
name=name,
manufacturer=manufacturer,
model=model,
Expand Down
6 changes: 3 additions & 3 deletions custom_components/idrac_power/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
serial = info[JSON_SERIAL_NUMBER]

device_info = DeviceInfo(
identifiers={('serial', serial)},
identifiers={(DOMAIN, serial)},
name=name,
manufacturer=manufacturer,
model=model,
Expand All @@ -37,7 +37,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
)

async_add_entities([
IdracPowerONButton(hass, rest_client, device_info, f"{serial}_{name}_status", name),
IdracPowerONButton(hass, rest_client, device_info, f"{serial}_{name}_power_on", name),
IdracRefreshButton(hass, rest_client, device_info, f"{serial}_{name}_refresh", name)
])

Expand Down Expand Up @@ -70,7 +70,7 @@ def __init__(self, hass, rest: IdracRest, device_info, unique_id, name):
self.rest = rest

self.entity_description = ButtonEntityDescription(
key='power_on',
key='refresh',
name=f"Refresh {name}",
icon='mdi:power',
device_class=ButtonDeviceClass.UPDATE,
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 @@ -37,7 +37,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry, async_add_e
serial = info[JSON_SERIAL_NUMBER]

device_info = DeviceInfo(
identifiers={('serial', serial)},
identifiers={(DOMAIN, serial)},
name=name,
manufacturer=manufacturer,
model=model,
Expand Down

0 comments on commit 2c612dc

Please sign in to comment.