Home Assistant is fairly new for me so i’m struggling with what I want to make and I’m not even sure if it would work with this integration.
We have around 7 screens/blinds around the house. Is there a way to create an automation that will open the blinds if there is rain expected within 15 minutes for example?
If it will start to rain within 15 minutes, it will trigger an automation to check if the blinds are closed or not. If they are closed, it will open them so that they don’t get wet.
Is it possible with this integration?
I monitored the “Volgende Waarschuwing/Next_warning” entity because I thought this would give me the value rain/snow/… But this is on a “unkown” state since I installed this integration 3 days ago.
That is expected: the warnings are for more extreme weather events like strong wind, heavy rainfall, thunder and so on. This is not meant to show when usual rain will fall.
What follows is not an automation, but a template sensor for the amount of rain expected in the next 20–30 minutes. From that, you should have a good starting point for your automation (monitor state change of this sensor, write your logic for the blinds).
Adding this in your configuration.yml file will create a new template sensor. This sensor will be updated every 10 minutes, on Home Assistant boot and whenever the weather state changes. It will fetch rain forecast from the radar and sum the forecast for the 3 next 10-minutes intervals. Note that the first interval will always be the current 10-minutes (e.g. at 11:01, the first interval will be 11:00 to 11:10).
template:
- trigger:
- platform: state
entity_id: weather.home
- platform: homeassistant
event: start
- platform: time_pattern
minutes: 10
action:
- service: irm_kmi.get_forecasts_radar
data:
include_past_forecasts: false
target:
entity_id: weather.home
response_variable: response
sensor:
- name: Rain in the next 20 minutes
unique_id: rain_20_minutes_template
state: "{{ response['weather.home'][:3] | map(attribute='native_precipitation') | sum }}"
unit_of_measurement: mm
Make sure that weather.home is replaced with your actual IRM / KIM weather entity.
The triggers are when my entity changes state or when HA starts
The service references to what I can find here, I use the type daily and the returned data goes into the variable response
Lastly I create a sensor with id temperature_today with the temperature value of the first forecast
This all seems correct with my current knowledge, I just can’t figure out what I’m doing wrong. I see the sensor.temperature_today in my HA, but the state is unknown.
Depending on what time you get the forecast there is no max temperature available for the current day. Actually I’m struggling with the same issue.
It’s native to the KMI app. If you check in the evening you can see the night (min) temperature, but the max from the current day is gone. If you check during the day a max and min for the current day will be available.