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:
![41%20PM](//community-assets.home-assistant.io/original/3X/6/8/68255dc00916dd7f7770e3490c198f6a03b1f740.png)
Here’s an example of the Node Red I use to change it.
![54%20PM](//community-assets.home-assistant.io/original/3X/5/e/5e7fcaa18c9fb96e5d749cad5888221c9dcbfd86.png)
![02%20PM](//community-assets.home-assistant.io/original/3X/6/a/6aa44403ce5feef0f65e3ac00f42e41e7aa89884.png)
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 ![:slight_smile: :slight_smile:](https://community.home-assistant.io/images/emoji/twitter/slight_smile.png?v=9)
1 Like