Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
Moment, "states" kam nur in meinem ersten Entwurf vor - das solltest Du aktuell (also meines Wissens nach) nicht verwenden, das funktioniert auch nur innerhalb von Home Assistant.es kommt die Meldung "states" is not declared
sensor:
- platform: homeassistant
id: forecast_temperature
name: "Vorhersage von Home Assistant"
entity_id: sensor.forecast
Developer von HA oder von ESP?kriege None zurück im developer
Da hast Du ein Komma und ein Leerzeichen zuviel{{ state_attr('weather.home', 'forecast')[0], ['templow'] }}
{{ state_attr('weather.home', 'forecast')[0]['templow'] }}
bringts./config/esphome/clean-101.yaml: In lambda function:
/config/esphome/clean-101.yaml:73:77: error: 'state_attr' was not declared in this scope
it.printf(200 ,0, id(digit_font), {{ state_attr('weather.home', 'forecast')[0]['templow'] }}
Nein, das darfst Du so nicht nach ESP übertragen, das muss in der configuration.yaml in Home Assistant angelegt werden, also dieser ganze Block:das ist die Meldung die ich bekomme, wenn ich versuche zu übertragen.....
sensor:
- platform: template
sensors:
forecast:
value_template: >
{{ state_attr('weather.home', 'forecast')[0]['temperature'] }}
friendly_name: Vorhersage
sensor:
nur, wenn Du noch keines in der Datei stehen hast.# Loads default set of integrations. Do not remove.
default_config:
# Text to speech
tts:
- platform: google_translate
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
sensor:
- platform: time_date
display_options:
- 'time'
- 'date'
- 'date_time'
- 'date_time_utc'
- 'date_time_iso'
- 'time_date'
- 'time_utc'
- 'beat'
- platform: template
sensors:
forecast:
value_template: >
{{ state_attr('weather.home', 'forecast')[0]['templow'] }}
friendly_name: Vorhersage
/config/esphome/clean-101.yaml: In lambda
function: /config/esphome/clean-101.yaml:73:65: warning: too many arguments for format [-Wformat-extra-args]
it.printf(200 ,0, id(digit_font), " °C", id(forecast_temperature));
/config/esphome/clean-101.yaml: In lambda function:
/config/esphome/clean-101.yaml:73:70: warning: format '%f' expects argument of type 'double', but argument 6 has type 'esphome::homeassistant::HomeassistantSensor*' [-Wformat=]
it.printf(140 ,0, id(digit_font), " %.1f °C", id(forecast_temperature));
time:
- platform: homeassistant
id: hass_time
# Example configuration entry
sensor:
# - platform: dht
# pin: GPIO4
# model: DHT22
# temperature:
# name: "Esp-Rest-103 Temperature"
# id: rest_103_temperatur
# accuracy_decimals: 0
#- platform: homeassistant
# id: current_temperatur
# entity_id: weather.home
# attribute: temperature
- platform: homeassistant
id: forecast_temperature
name: "Vorhersage von Home Assistant"
entity_id: sensor.forecast
# Example configuration entry
spi:
clk_pin: GPIO14
mosi_pin: GPIO12
display:
- platform: max7219digit
cs_pin: GPIO15
num_chips: 8
intensity: 0
lambda: |-
it.strftime(18, 0, id(digit_font), "%H:%M", id(hass_time).now());
it.printf(44, 0, id(digit_font), "Uhr");
it.strftime(80, 0, id(digit_font), " %d-%h-%y ", id(hass_time).now() );
it.printf(150 ,0, id(digit_font), "%s.1f °C", id(forecast_temperature));
# if (id(current_temperatur).has_state()) {
# it.printf(150, 0, id(digit_font), "%.1f", id(forecast_temperature).state);
# }
# it.strftime(140, 0, id(digit_font), "%d-%b-%y", id(hass_time).now());
# it.strftime(30, 0, id(digit_font), id(haas_time).now());
# it.strftime(295, 0, id(digit_font), "%H:%M", id(esptime).now());
# // %% - literal % sign
# it.print(37, 0, id(digit_font), " %.1f°C %.1f%%", id(rest_103_temperatur).state, id(rest_103_luftfeuchtigkeit).state);
font:
- file: "pixelmix.ttf"
id: digit_font
size: 8