Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106146

Hourly weather forecast sensor

$
0
0

Hello to everyone,

Can someone help me? Why does variant 1 work but variant 2 does not? If I do it this way, do all sensors get the status unknown?

Greetings
Moss


  - trigger:
      - platform: time_pattern
        hours: /1
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecasts
        data:
          type: hourly
        target:
          entity_id: weather.home
        response_variable: hourly
    sensor:
      - name: Niederschlag Vorhersage
        unique_id: home_vorhersage_niederschlag
        state: "{{ hourly['weather.home'].forecast[0].precipitation }}"
        unit_of_measurement: mm

  - trigger:
      - platform: time_pattern
        hours: /1
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecasts
        data:
          type: hourly
        target:
          entity_id: weather.home
        response_variable: hourly
    sensor:
      - name: Niederschlagswahrscheinlichkeit Vorhersage
        unique_id: home_vorhersage_niederschlagswahrscheinlichkeit
        state: "{{ hourly['weather.home'].forecast[0].precipitation_probability }}"
        unit_of_measurement: '%'

  - trigger:
      - platform: time_pattern
        hours: /1
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecasts
        data:
          type: hourly
        target:
          entity_id: weather.home
        response_variable: hourly
    sensor:
      - name: Temperatur Vorhersage
        unique_id: home_vorhersage_temperatur
        state: "{{ hourly['weather.home'].forecast[0].temperature }}"
        unit_of_measurement: °C

  - trigger:
      - platform: time_pattern
        hours: /1
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecasts
        data:
          type: hourly
        target:
          entity_id: weather.home
        response_variable: hourly
    sensor:
      - name: Windgeschwindigkeit Vorhersage
        unique_id: home_vorhersage_windgeschwindigkeit
        state: "{{ hourly['weather.home'].forecast[0].wind_speed }}"
        unit_of_measurement: km/h


  - trigger:
      - platform: time_pattern
        hours: /1
      - platform: homeassistant
        event: start
    action:
      - service: weather.get_forecasts
        data:
          type: hourly
        target:
          entity_id: weather.home
        response_variable: hourly
    sensor:
      - name: Niederschlag Vorhersage
        unique_id: home_vorhersage_niederschlag
        state: "{{ hourly['weather.home'].forecast[0].precipitation }}"
        unit_of_measurement: mm
      - name: Niederschlagswahrscheinlichkeit Vorhersage
        unique_id: home_vorhersage_niederschlagswahrscheinlichkeit
        state: "{{ hourly['weather.home'].forecast[0].precipitation_probability }}"
        unit_of_measurement: '%'
      - name: Temperatur Vorhersage
        unique_id: home_vorhersage_temperatur
        state: "{{ hourly['weather.home'].forecast[0].temperature }}"
        unit_of_measurement: °C
      - name: Windgeschwindigkeit Vorhersage
        unique_id: home_vorhersage_windgeschwindigkeit
        state: "{{ hourly['weather.home'].forecast[0].wind_speed }}"
        unit_of_measurement: km/h

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106146

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>