Add firmware and hardware version to WiZ (#66017)
parent
480ce84b8a
commit
721d711762
|
@ -46,8 +46,8 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
|||
_LOGGER.debug("Get bulb with IP: %s", ip_address)
|
||||
bulb = wizlight(ip_address)
|
||||
try:
|
||||
await bulb.getMac()
|
||||
scenes = await bulb.getSupportedScenes()
|
||||
await bulb.getMac()
|
||||
# ValueError gets thrown if the bulb type
|
||||
# cannot be determined on the first try.
|
||||
# This is likely because way the library
|
||||
|
|
|
@ -23,11 +23,16 @@ class WizToggleEntity(CoordinatorEntity, ToggleEntity):
|
|||
bulb_type: BulbType = self._device.bulbtype
|
||||
self._attr_unique_id = self._device.mac
|
||||
self._attr_name = name
|
||||
hw_data = bulb_type.name.split("_")
|
||||
board = hw_data.pop(0)
|
||||
model = hw_data.pop(0)
|
||||
self._attr_device_info = DeviceInfo(
|
||||
connections={(CONNECTION_NETWORK_MAC, self._device.mac)},
|
||||
name=name,
|
||||
manufacturer="WiZ",
|
||||
model=bulb_type.name,
|
||||
model=model,
|
||||
hw_version=f"{board} {hw_data[0]}" if hw_data else board,
|
||||
sw_version=bulb_type.fw_version,
|
||||
)
|
||||
|
||||
@callback
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
],
|
||||
"dependencies": ["network"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/wiz",
|
||||
"requirements": ["pywizlight==0.5.1"],
|
||||
"requirements": ["pywizlight==0.5.2"],
|
||||
"iot_class": "local_push",
|
||||
"codeowners": ["@sbidy"]
|
||||
}
|
||||
|
|
|
@ -2051,7 +2051,7 @@ pywemo==0.7.0
|
|||
pywilight==0.0.70
|
||||
|
||||
# homeassistant.components.wiz
|
||||
pywizlight==0.5.1
|
||||
pywizlight==0.5.2
|
||||
|
||||
# homeassistant.components.xeoma
|
||||
pyxeoma==1.4.1
|
||||
|
|
|
@ -1276,7 +1276,7 @@ pywemo==0.7.0
|
|||
pywilight==0.0.70
|
||||
|
||||
# homeassistant.components.wiz
|
||||
pywizlight==0.5.1
|
||||
pywizlight==0.5.2
|
||||
|
||||
# homeassistant.components.zerproc
|
||||
pyzerproc==0.4.8
|
||||
|
|
Loading…
Reference in New Issue