A few questions

Afternoon,

I wasn’t really sure if this is the right place to post this so apologies in advance if I am wrong.

I am still learning the in’s and outs of Home Assistant and spent the last few days migrating all of my Zwave devices from another platform over to this. But I have a few questions I am hoping there is an easy answer to as I haven’t really found a definitive answer

  1. In my old system we could create an automation. For this purpose lets say when triggered turns out the lights I choose in the automation. The we would make a button and link that button to that automation. Say for example at night I want to close the garage door if open, lock the front door and turn off any light in my automation. I would press the button in my app and essential put the house to sleep. In addition …

  2. We also had variables which were used in automations. For example in the above automation I could create a variable that said HomeState and in that state have Awake and Sleep. So when I fire the above automation part of it may change that variable to Sleep. This was used for other automations.

Lets say my bedroom has a motion sensor that turns the lights on only after dark but if the variable HomeState is set to awake. That way when I put the house to sleep rolling over in bad won’t turn my lights on.

I am sure all of this can be accomplished in HA I am just unsure where to begin. Can anyone point me in a direction?

~Joe

In Home Assistant, a script is a sequence of actions whereas an automation defines a trigger, and an optional condition (serves as a “filter”) that executes a sequence of actions.

For your requirement, you can compose a script to "close the garage door if open, lock the front door and turn off any light " and then create a Button that, when pressed in the UI, executes the script. Obviously there a more details but that’s the gist of it.

In Home Assistant, there are entities called “helpers” that store information and can be accessed via the UI. The ones that behave like the variables you described have names that begin with the word “input”. For example, input_text stores text, input_boolean indicates on or off, and input_select provides a selection of options (for example, to offer the choice of Away or Sleep).

An automation would look something like this:

alias: example 777
trigger:
- platform: state
  entity_id: binary_sensor.bedroom_motion
  to: 'on'
condition:
- condition: state
  entity_id: sun.sun
  state: below_horizon
- condition: state
  entity_id: input_select.homestate
  state: Awake
- condition: state
  entity_id: light.bedroom
  state: 'off'
action:
- service: light.turn_on
  entity_id: light.bedroom

When motion in the bedroom is detected and the sun is below the horizon and HomeState is Awake and the bedroom light is currently off, turn on the bedroom light.

1 Like

The input_select also has me a bit confused. If multiple options are in the list how does it change. I assume when you fire the script one of them is to change the current option? Am I misunderstanding this?

It sort of sounds like you are coming from Indigo (the variables thing), in which case HA is the exact same system that your old system was behind the scenes (mostly), the difference being that the old system had different UI’s to accomplish the same stuff under the hood.

It can be manually by clicking on the helper device or it can be programatic by telling HA to select an option for you, i.e.,:

  - service: input_select.select_option
    data:
      entity_id: input_select.sleep_mode
      option: 'Awake' 

Thank You its all starting to make some sense. And you are correct about Indigo. Have to ask is this Colorado from there?

It is! I’ve been working on an Indigo to Home Assistant “manual” but it’s going to take a while. But, in general, HA is a more advanced but less UI friendly version of Indigo. Don’t get me wrong, I really loved Indigo, but when it came time to buy a new Mac and renew my license I started to wonder if I needed that or wanted to go a different route. Here I am :slight_smile:.

A couple things I did that helped me over the hump were doing things like naming my Automations so they grouped together like Indigo (i.e., “Schedule: Turn on Lights”, “Trigger: Motion Detected” and “Action Group: Shutdown House”) so Automations actually look much like Indigo now. That helps to demystify that a bit. Helpers are variables, but there is also a variables add-on that you can use.

Once you use HA a bit you really get comfortable with it because it’s easy to see “ah, yes, that’s the same as Indigo but just looks a bit different”.

The hardest obstacle is YAML, but it’s actually pretty easy and quite powerful.

I thought it was you. I had seen you were leaving and honestly I was in the same boat. I had noticed that it seemed like many of the new things were passing me by and short of the 3rd party developers like you adding content the core never seemed to move forward.

I struggled to renew myself since it really seemed to be geared toward developers more. I too loved it but just needed something to remark my interest. I been slowly moving items over but over 100 zwave devices it becomes daunting hahah

Well now the moniker makes sense to me. “Carbon Monoxide Four by Four” seemed rather peculiar.

Always interesting to bump into fellow users from other products. Although I’m not a former Indigo user I was aware of its existence from other members on Cocoontech. This community includes former users of Indigo, HomeSeer, CQC, Premise, openHAB, Domoticz, FHEM, IoBroker, MisterHouse, etc. Could be some former HouseBot users as well but I haven’t seen it mentioned yet.

1 Like

Yea, Indigo is a great product but I think we are nearing the end of life on it. I only say that because needing a dedicated full blown computer for home automation is probably overkill these days (I have well over 200 devices running on my HA RPi). More folks are flocking to other things like this and Smartthings where they have a wider product support base. Just my opinion.

Haha :slight_smile:. Yea, I was a pretty prolific contributor to Indigo, in all I wrote about 30 different add-ons, several of which are kind of the “core” add-ons for Indigo. I wrote the HomeKit integration a while back, haven’t really touched it in a couple of years and it’s still got a very large user base. I hope to dive more into that kind of thing here but still learning the ropes on the API.

1 Like