Hi, I have successfully added to my configuration.yaml file lines to create some temperature sensors with data coming from MQTT
# Temp Sensors
mqtt:
- sensor:
name: "Garage Network Cabinet Temperature Sensor"
state_topic: "HS4/Garage_Network_Cabinet_Temp"
suggested_display_precision: 1
unit_of_measurement: "°C"
unique_id: "Garage Network Cabinet Temperature"
- sensor:
name: "Upstairs Network Cabinet Temperature Sensor"
state_topic: "HS4/Upstairs_Network_Cabinet_Temp"
suggested_display_precision: 1
unit_of_measurement: "°C"
unique_id: "Upstairs Network Cabinet Temperature"
- sensor:
name: "Roof Temperature Sensor"
state_topic: "HS4/Roof_Temp"
suggested_display_precision: 1
unit_of_measurement: "°C"
unique_id: "Roof Temperature"
Now I want to add more sensor from MQTT for example
I want to add a door sensor
But when I add code it stops the temperature sensors from working?
sensor:
name: "Garage To House Door Sensor"
state_topic: "HS4/Garage_To_House_Door"
payload_on: "1"
payload_off: "0"
device_class: door
how do I correcy add sensor so it show up in the overview page as
Doors
Garage to house door “Open or Closed”
with the little door open closed icon?
francisp
(Francis)
September 13, 2023, 10:39am
2
# Temp Sensors
mqtt:
- sensor:
name: "Garage Network Cabinet Temperature Sensor"
state_topic: "HS4/Garage_Network_Cabinet_Temp"
suggested_display_precision: 1
unit_of_measurement: "°C"
unique_id: "Garage Network Cabinet Temperature"
- sensor:
name: "Upstairs Network Cabinet Temperature Sensor"
state_topic: "HS4/Upstairs_Network_Cabinet_Temp"
suggested_display_precision: 1
unit_of_measurement: "°C"
unique_id: "Upstairs Network Cabinet Temperature"
- sensor:
name: "Roof Temperature Sensor"
state_topic: "HS4/Roof_Temp"
suggested_display_precision: 1
unit_of_measurement: "°C"
unique_id: "Roof Temperature"
- sensor:
name: "Garage To House Door Sensor"
state_topic: "HS4/Garage_To_House_Door"
payload_on: "1"
payload_off: "0"
device_class: door
That does this , Line 14 failed
francisp
(Francis)
September 13, 2023, 10:47am
4
Yup, your door is a binary_sensor
# Temp Sensors
mqtt:
- sensor:
name: "Garage Network Cabinet Temperature Sensor"
state_topic: "HS4/Garage_Network_Cabinet_Temp"
suggested_display_precision: 1
unit_of_measurement: "°C"
unique_id: "Garage Network Cabinet Temperature"
- sensor:
name: "Upstairs Network Cabinet Temperature Sensor"
state_topic: "HS4/Upstairs_Network_Cabinet_Temp"
suggested_display_precision: 1
unit_of_measurement: "°C"
unique_id: "Upstairs Network Cabinet Temperature"
- sensor:
name: "Roof Temperature Sensor"
state_topic: "HS4/Roof_Temp"
suggested_display_precision: 1
unit_of_measurement: "°C"
unique_id: "Roof Temperature"
- binary_sensor:
name: "Garage To House Door Sensor"
state_topic: "HS4/Garage_To_House_Door"
payload_on: "1"
payload_off: "0"
device_class: door
Yes that worked, I had to remove the old entity first then when I added it again in yaml it worked.
How do I change the name on the card from Binary Sensor to say Door Sensors?
francisp
(Francis)
September 13, 2023, 11:08am
6
if it is the autogenerated dashboard, you can’t
Ok I guess I can create a custom dashboard and add them to it.
I did manage to add My PIR sensor and change to the icon to motion, seemed to work well.
Thanks for you time, Very helpful