Coder Social home page Coder Social logo

Forecasted data as triggers about dwd_weather HOT 9 CLOSED

fl550 avatar fl550 commented on June 9, 2024
Forecasted data as triggers

from dwd_weather.

Comments (9)

diplix avatar diplix commented on June 9, 2024

you’ll have to use a template sensor , i did that to create an alarm if the temperature drops below 0°C.

template:
  - sensor:
      - name: Tiefsttemperatur in 24 h
        unique_id: E74013A7-348C-44F8-B4B1-93E5992C1840
        unit_of_measurement: °C
        state: >-
            {% set tomorrow = (as_timestamp(now() + timedelta(hours=24)) | timestamp_local) %}
            {% set today = state_attr('sensor.temperature_berlin_tegel', 'data')| selectattr('datetime', 'lt', tomorrow) | map(attribute='value') | list %}
            {{ today | min }}

this should also work to get a sensor to show the highest wind speed in the next n hours which can then be used as an automation trigger.

from dwd_weather.

sk365 avatar sk365 commented on June 9, 2024

from dwd_weather.

diplix avatar diplix commented on June 9, 2024

sorry, i did an incomplete copy&paste missing the template: line. i corrected the code above and hope it works like this.

from dwd_weather.

sk365 avatar sk365 commented on June 9, 2024

from dwd_weather.

diplix avatar diplix commented on June 9, 2024

seems to work for me, at least with the temperature.
image

from dwd_weather.

sk365 avatar sk365 commented on June 9, 2024

from dwd_weather.

FL550 avatar FL550 commented on June 9, 2024

Is the sensor showing the forecast data in the correct interval? You can check this in the developer tab

from dwd_weather.

sk365 avatar sk365 commented on June 9, 2024

from dwd_weather.

FL550 avatar FL550 commented on June 9, 2024

oh, I oversaw your last comment 😅
glad everything is working now!

from dwd_weather.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.