In order to make things simpler, it would be great to implement a discovery topic (https://www.home-assistant.io/docs/mqtt/discovery/#switches and https://www.home-assistant.io/docs/mqtt/discovery/#sensors-with-multiple-values) https://www.home-assistant.io/integrations/sensor.mqtt/ https://www.home-assistant.io/integrations/switch.mqtt/