İçeriğe geç

HomeAssistant için MQTT Harici DHT11 ve Röle Script örneği

mqtt:
  broker: 127.0.0.1
  
sensor:
  - platform: mqtt
    name: "Temperature"
    state_topic: "hSensor-2b43fd/sensor/temperature"
    unit_of_measurement: "°C"
    value_template: "{{ value_json }}"
  - platform: mqtt
    name: "Humidity"
    state_topic: "hSensor-2b43fd/sensor/humidity"
    unit_of_measurement: "%"
    value_template: "{{ value_json }}"
switch:
  - platform: mqtt
    name: "tukkan"
    unique_id: tukkan_relay
    state_topic: "hSensor-2b43fd/sensor/relay"
    command_topic: "hSensor-2b43fd/sensor/relay"
    payload_on: "1"
    payload_off: "0"
    state_on: "1"
    state_off: "0"
    optimistic: false
    qos: 0
    retain: false
  - platform: template
    switches:
      blind_kitchen_left_up:
        friendly_name: "Reset"
        value_template: "{{ is_state('switch.tukkan', '0') }}"
        turn_on:
        - service: switch.turn_on
          data:
            entity_id: switch.tukkan
        - delay: 0.5
        - service: switch.turn_off
          data:
            entity_id: switch.tukkan
        turn_off:
        - service: switch.turn_off
          data:
            entity_id: switch.tukkan
        icon_template: "mdi:blinds"
Kategori:ElektronikHomeAssistantIOT

İlk Yorumu Siz Yapın

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir