Hi,
I am using a small display with ESP32-S3 that I bought recently, It is Working great. But to control and display more stuff on the Display, I need a global variable that I need to control from the home assistant dashboard. Like,
- I want to show a Custom Text on a field I dedicated
- Change the Time Format to 12/24 Hrs using a toggle on HA Dashboard
etc.
I thought of using globals in ESPHome but that doesn’t expose the variable to homeassistant.
Sample YAML
globals:
- id: Temperature_Unit
type: int
restore_value: False
initial_value: "0"
- id: Message
type: std::string
restore_value: False
initial_value: "Hi"
I also tried some advice on the Forum as follows,
sensor:
- platform: homeassistant
entity_id: input_number.Temperature_Unit
name: Temperature_Unit
id: Temperature_Unit_Set
on_value:
then:
- lambda: !lambda |-
id(Temperature_Unit) = id(Temperature_Unit_Set).state;
ESP_LOGW("new Unit","Temperature_Unit: %.1f Unit: %d", id(Temperature_Unit_Set).state, id(Temperature_Unit));
Still No entity on HA.
I am currently not OK with solution with service because, I couldn’t bring that easily on the dashboard. Suppose you can help me with that. I may proceed with that.