Skip to content

Commit

Permalink
Update fan.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldt80 authored Nov 24, 2024
1 parent 7473f62 commit 356f874
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions custom_components/philips_airpurifier_http/fan.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
unique_id = None

wifi = await hass.async_add_executor_job(client.get_wifi)
if PHILIPS_MAC_ADDRESS in wifi:
unique_id = wifi[PHILIPS_MAC_ADDRESS]

device = PhilipsAirPurifierFan(hass, client, name)

device = PhilipsAirPurifierFan(hass, client, name, unique_id)
if DATA_PHILIPS_FANS not in hass.data:
hass.data[DATA_PHILIPS_FANS] = []

Expand Down

0 comments on commit 356f874

Please sign in to comment.