So i am pretty new to home assistant so please bear with me on this.
im not the best at coding so examples of code would be awesome .
for general info i am running hassio on a Pi3
this is what i am wanting to do.
I want my home status to be an entity/object so for example it would show up as an actual entity that can be controlled from other things.
my home status options would be: Home, Alarm active, Intruder alert, Emergency
The intention is this which should be easy in node red to set up will be for example:
window door sensor is triggered – the house status is checked — if the status is home do nothing-- if the status is alarm active then change the status to intruder alert (which would then itself act as a trigger to turn on lights and siren etc)
you get the idea
but i need that stand alone home entity/object that will show up in my entities list.
Thanks in advance
Have a look at input selects where you can define a list of options, and change the state via services:
1 Like
also look at alarm_control_panel
that looks like what i am after.
i have managed to get a drop down of the 4 states i need on the .those being home, armed, intruder and emergency
next what i have to do is have it so that when my door switch entity fires it does nothing if home is selected but if armed is selected it changes the status to intruder
yeh while it shows up on screen i dont have access to it as an entity.
either i am doing it wrong or it is not the right thing.
i essentially want a virtual entity with 4 states that will actually show up as an entity
any ideas?
As @exxamalte said I’m using an inputselect.
Coming from smartthings and then hubitat I’m very used to the concept of a "mode”.
So I just made my own with this.
can you go in a little deepar as to how you have it set up?
Sure here’s my config:
Here’s an example of the Node Red I use to change it.
Have you found it in the meantime? If it shows up on the screen, it must be there as an entity - in the developer tools’ states it will show up as “input_select. …”.
thats perfect i was scratching my head thank you
yes i have figured it out now i appreciate everyones help
1 Like
this part is working its changing the state every time i activate the door window sensor which is great.
now diving in a little deeper.
say i have three states on off and detected (detected being the trigger for sirens etc) naturally i would want to ignore when the trigger fires from the window door sensors when the system is set to off
what would you think is the best way to achieve this using node red?
i have it set up in the automatons and basically i set a condition of only change to detected if the state is on
cancel that last question i worked it out
1 Like