Skip to content

Instantly share code, notes, and snippets.

@jeffersonchaves
Created July 31, 2024 00:08
Show Gist options
  • Save jeffersonchaves/6a48a08a10c308c97c767b5b9eb7bb6d to your computer and use it in GitHub Desktop.
Save jeffersonchaves/6a48a08a10c308c97c767b5b9eb7bb6d to your computer and use it in GitHub Desktop.
# Example configuration.yaml entry
mqtt:
sensor:
- name: "Nova Temperatura"
state_topic: "ifpr/sala/temperatura"
unique_id: ifpr_sala_temperatura
unit_of_measurement: "°C"
qos: 0
- name: "Nova Temperatura 2"
unique_id: ifpr_sala_temperatura2
state_topic: "ifpr/sala/temperatura2"
unit_of_measurement: "°C"
value_template: "{{ value_json.temperatura }}"
json_attributes_topic : "ifpr/sala/temperatura2"
light:
- name: "Luz sala professores"
state_topic: "ifpr/sala/lampada/switch"
command_topic: "ifpr/sala/lampada/switch"
payload_on: "ON"
payload_off: "OFF"
qos: 0
optimistic: false
- name: "Luz sala professores2"
schema: template
state_topic: "ifpr/sala/lampada2/status"
command_topic: "ifpr/sala/lampada2/switch"
state_template: '{{ value_json.state }}'
command_on_template: '{"state": "on"}'
command_off_template: '{"state": "off"}'
qos: 0
optimistic: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment