I have a KNX-group 4/0/9 “Wind-Alarm” with an MDT Jal-0810 actor.
Since I don’t have any KNX wind sensor device yet, that measures the true wind, I just requested the wind-data from the local weather data provider, which is currently good enough.
So the entity “sensor.local_wind_speed” delivers the current wind-speed in km/h
I want to forward an alarm-value with binary-value “true” to the KNX wind alarm group, if the wind exceeds 60 km/h.
The actor is waiting for a signal at least every 3 minutes or less. Otherwise wind-alarm is automatically set to true.
Therefore I want also to forward a signal “false” every 1 minute to the alarm-group, to inform the group, that the measurement-device still works but values are ok.
I don’t figure out how to set something like this up in home assistant.
Tried a lot around and did some search, but I don’t really figure out how to work with the templates, conditionals and triggers yet.
Here is one of my trials (of course there are a lot of errors, but I’m missing any clue):
Why all these single quotes in the beginning of every line of code? Your indentation is also wrong, did you take a look at the automation documentation and some examples?
Now what I’m still missing is the correct automation for the trigger, to change the value of the binary_sensor-entity to 1, if the wind-speed increases 60 km/h
here is a try to verify every 1 minute the current state and set the binary-sensor.
I just want to change the sensor-state to the value of a true/false state if the weather-data gives a value greater or lower than 60 km/h
Im not entirely sure. Try to use a template sensor combined with the expose sensor instead of a binary_sensor.
The binary_sensor device is for Knx to HA - not the other way around.
hm,
the binary function already works:
If I set the binary sensor state manually to true, the KNX-Jal-actor notices the windalarm.
What I didn’t figure out yet is how to trigger the signal of the local weather-supplier into a boolean sensor value once a minute.
So if the local weather supplier reports, that the wind speed exceeds 60 km/h, I want to change the value of “binary_sensor.windalarm” to true. Otherwise the value is false.
I think about an automation rule with a trigger command. But I don’t know how to handle these variables yet.
If you create an expose sensor with an entity_id of a binary sensor with the same GA double check that you didn’t create a loop on your bus. Therefore I suggested the template sensor.
I’d just create an automation that triggers to on when wind is > 60 and off when it’s < 40 or so. The periodical sending could be an extra (third) automation.
Thats it and exactly what I was looking for!
Works great - thanks!
I thought the template-platform comes always with a trigger or conditional automation, but didn’t know that one can use it also as a sensor.
Do I need any conditional- or trigger-commands as well for this?
I mean, what is then actually the reason for using conditionals?
Even or/and-commands could be easily done using sensors like above and stay more simple?
I don’t understand what conditionals you are talking about.
Are you talking about automations? You may be confused because you wanted to set the binary sensor with an automation and I showed you a way that the binary sensor sets the state himself without using an automation.