vincen
(Vincèn)
September 8, 2017, 10:44am
1
Hi
I have wired two PIR sensors on an ESP8266 running ESPEasy. I see correctly their status in ESP and so I added these two input switches in my config file of HA:
- platform: mqtt
state_topic: '/esp/PIR_1/Switch'
name: 'PIR 1 SDB'
platform: mqtt
state_topic: ‘/esp/PIR_2/Switch’
name: ‘PIR 2 SDB’
But in my web interface they just appear as MQTT Sensor and not with nice name I chose in config file ! Is there something missing somewhere ??
Thanks
Vincèn
edit your customize.yaml
or the customize:
section (which ever you use) and for each sensor add an entry
sensor.your_sensor_name
friendly_name: Name to Display
icon: mdi:icon of your choosing
when you are setting up your sensors
- platform: mqtt
state_topic: '/esp/PIR_1/Switch'
name: 'PIR 1 SDB'
it just tells ha that this particular sensor will be called sensor.pir_1_sdb
1 Like
dodacs
(Douglas C. Santos)
September 9, 2017, 4:38am
3
I have the below code and it woks fine. I only used the costomize section to change the icon.
- platform: mqtt
state_topic: "smartthings/solar/net"
name: "Energy Net"
unit_of_measurement: "W"
1 Like