Hi,
I have a device with multiple entities using MQTT autodiscovery
The topics are:
BELL_VOLUME_PREFIX = f"homeassistant/number/bell-client-1/volume"
BELL_SWITCH_PREFIX = f"homeassistant/switch/bell-client-1"
BELL_SOUND_PREFIX = f"homeassistant/number/bell-client-1/sound"
These topics are configured for a single MQTT client. However, I can only set one last will per client,
where actually I wan’t to set the availability for each entity to ‘offline’. Thus, if I do this:
self.client_inst.will_set(topic=f"{BELL_VOLUME_PREFIX}/status", payload="offline", qos=0, retain=False)
self.client_inst.will_set(topic=f"{BELL_SWITCH_PREFIX}/status", payload="offline", qos=0, retain=False)
self.client_inst.will_set(topic=f"{BELL_SOUND_PREFIX}/status", payload="offline", qos=0, retain=False)
it will only set the ‘bell sound’ status to offline after unexpected disconnection. Does anybody maybe know a nice way to achieve what I want?