I am trying to create an automation on the state of a Home Assistant Device, Following is my current code:
text_sensor:
- platform: homeassistant
name: "Lampe Salon"
entity_id: switch.lampe_salon
on_value:
then:
#- light_turn_on:
# id: compressor_switch1
- lambda: |-
ESP_LOGI("main", "The compressor is %s", x.c_str());
light:
platform: binary
output: ${esp_id}_BuildInLED
name: Compressor Switch 1 # Comment or uncomment to have visible in Home Assistant
id: compressor_switch1
restore_mode: ALWAYS_ON
output:
platform: gpio
id: ${esp_id}_BuildInLED
pin:
number: D4
inverted: true
I wish to turn_on the my âid: compressor_switch1â which is the build-in on my D1Mini based on the value from my Home Assistant Device âentity_id: switch.lampe_salonâ, I have try different thing on-value, on_turn_on and other but could not find that right one. Was also unable to find information in the documentation. Could someone help me?