Hi ,
i’m a beginner and i’m trying to understand basic function.
I’d like to change the icon color based on the state of a input connected to my ESP32. What i have to do in Home Assistant ?
I defined in esphome a binary sensor as a gpio input, and i see it on HA, but i’d like to see only the icon without any text.
Main goal is to have a card composed by an icon with color controlled by a esp input and a button that controlled an esp output.
EDIT: i add some details to be more clear about the goal:
I have a classic light system based on bi-stable relay and pushbutton, and i’d like to add a software pushbutton a manage it by home assistant. To do that i’d like to use an ESP32 and wiring all like in the picture
in esphome i’m using following code
button:
- platform: template
name: "button1"
on_press:
then:
- logger.log: Button Pressed
- output.turn_on: generic_out
- delay: 500ms
- output.turn_off: generic_out
output:
- platform: gpio
pin: GPIO18
id: generic_out
and i have that card in home assistant
Pushbutton working as i want, but now i’d like to control the icon state with the feedback from K2 (the esp32 input) but i dont’ know how to do it.
Thanks