this is my first post here and I am very happy that this community exists. Recently I got myself a Raspberry with hassio Home assistant v0.118.5 and a bunch of Shellies. I am at the very beginning of home-automation and about to learn the basics via research on Youtube, the internet and a node-red learning portal.
I configured an automation in hassio which does the following and works great:
at sunset my light in the living-room should turn on.
trigger: sunset
conditions: consumption of switch 1 on the Shelly is <1 (the Shelly has two channels)
if consumption is below <1, toggle channel 1 & 2 on the Shelly
I tried to rebuild this automation in node-red. If I use an inject-node it works as supposed. As I want the script to run at sunset I tried the big timer which should turn on at sunset. the problem is that the current state node doesnt check the current consumption as soon as the big timer turns on. I’ve also tried the poll state node (60 seconds update interval) and then it works, but it doesnt take the big timer into account.
Would appreciate some help to this (very basic) automation. I’ve spent hours on trying this out and also checked the search but could not find a solution for it.
My approach is to implement basic automations to better understand node-red and its principle functions.
I set one up for turning my outside light on at sunset that may help you. (to learn from)
set up the “sun” sensor in HA
then in node red
setup state_changed node hook that too a switched node then that node, set up above_horizon, add one and add below horizon.
then depending on the state of the sun, my outside light turns on and off automatically.
just a short update. Unfortunately Blocking Input Overrides did not work. the setup from ghvader helped and it works like a charm in my case it measures the consumption of two channels and turns on the light if the consumption is <1 watt.