Skip to content

Commit

Permalink
feat: Rename control_unit device
Browse files Browse the repository at this point in the history
  • Loading branch information
alepee committed Nov 18, 2024
1 parent 74cef14 commit d82996a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/hitachi_yutaki/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
model_name = MODEL_NAMES.get(unit_model, "Unknown Model")

# Add main unit device
device_name = DEVICE_CONTROL_UNIT.replace("_", " ").title()

device_registry.async_get_or_create(
config_entry_id=entry.entry_id,
identifiers={(DOMAIN, f"{entry.entry_id}_{DEVICE_CONTROL_UNIT}")},
manufacturer="Hitachi",
model=model_name,
name=DEVICE_CONTROL_UNIT.title(),
name=device_name,
via_device=(DOMAIN, f"{entry.entry_id}_{DEVICE_GATEWAY}"),
)

Expand Down

0 comments on commit d82996a

Please sign in to comment.