- platform: homeassistant
id: nspanel_text
entity_id: input_text.nspanel
on_value:
# Push it to the display
then:
- lambda: 'id(disp1).set_component_text_printf("t1", "%s", id(nspanel_text).state.c_str());'
Error message:
/config/esphome/nspanel-teszt.yaml: In lambda function:
/config/esphome/nspanel-teszt.yaml:104:72: error: request for member ‘c_str’ in ‘nspanel_text->esphome::homeassistant::HomeassistantSensor::.esphome::sensor::Sensor::state’, which is of non-class type ‘float’
/config/esphome/nspanel-teszt.yaml: In lambda function:
/config/esphome/nspanel-teszt.yaml:104:72: error: request for member 'c_str' in 'nspanel_text->esphome::homeassistant::HomeassistantSensor::<anonymous>.esphome::sensor::Sensor::state', which is of non-class type 'float'```
I miss the most important line from your yaml-config : What kind of sensor is ns_panel_text? It looks like you defined it as a sensor: (their state is always a float) instead of a text_sensor: