How do I declare a selector from MQTT

Hi, apologies for the dumb-ass question, but can someone help please…

Very new to home assistant, my house has been running automation for ~15 years, so some of it is very antiquated :slight_smile: I’ve successfully been made measurement data and power control available to HA using MQTT using discovery messaging, however I’m stuck…

Does anyone have an example that creates something with choices? (example - a switch has on/off - but I have a solar inverter which has 3 states, feedIn, gridFirst & backUp). My JSON for a switch (emitted on “homeassistant/switch/power-living-tv/plug/config”) looks like:

{"device_class":"switch","name":"TV","unique_id":"TV power/living/tv switch","payload_on":"1","payload_off":"0","state_topic":"time/power/living/tv","command_topic":"power/living/tv","qos":2,"retain":false,"device":{"identifiers":["D_ID:TV"],"name":"TV","model":"me TV","manufacturer":"me"}}

I really really don’t want to put configuration in two places, so would like the solar inverter to self-configure HA.

thanks…

The basics are covered in MQTT Select. If you’ve already seen that, post what you tried and any errors from your logs.

Thanks - I hadn’t (no idea how I missed it!). working now :slight_smile: