I wanted a way to get the IP address of my tasmota Sonoff
just need a hand to automate it
I have
- platform: mqtt
name: "SonOff IP"
state_topic: 'stat/Wemos_fan/RESULT'
value_template: "{{ value_json.IPAddress1.split(' ')[1].replace('(','').replace(')','') }}"
if i send this mqtt topic
cmnd/Wemos_fan/ipaddress
with a payload of 1 ( think it can be anything )
and I get this back
Happy Camper
This got me Thinking why can’t i have a input_select with all my sonoff in it so
sonoff_list:
name: SonOff List
options:
- SONOFF5
- SONOFF6
- SONOFF7
- SONOFF10
- SONOFF11
- workshop
- Wemos_fan
initial: Wemos_fan
So why question is
How do I change the state_topic in the SonOff IP to match the SonOff List I have selected
and the samw with mqtt.publish
I played in the Templates and work out this
stat/{{ states("input_select.sonoff_list") }}/RESULT
and
cmnd/{{ states("input_select.sonoff_list") }}/ipaddress
don’t know how to add it to the state_topic and mqtt.publish
then the outcome would look like this
Thanks