I have single room ;test_room’ in my hue bridge with two lights: ‘Hue white lamp 1’ and ‘Hue white lamp 2’
Hass shows my ‘test_room’ as Area in Configuration->Areas
In Configuration->Devices I see both lights listed and “Area” column shows ‘test_room’
It is possible to publish this information with mqtt ?
I would like to publish to topic a payload like this:
/homeassistant/areas/test_room: ["hue white lamp1", "hue white lamp 2"]
so when I create new room ‘another room’ in hue bridge and add lights to it then hass will publish new topic /homeassistant/areas/another_room with payload as above.
You could create an automation that uses an Event Trigger to listen for: event_type: area_registry_updated
Beyond that, you’ll have to experiment to determine what is reported in event_data when a new room is created on the Hue bridge (or an existing room is modified). You will need that information to both constrain the Event Trigger to Hue-related activity and to publish it using mqtt.publish (in the automation’s action).