How To: Turn A Light On/Off With An Inovelli Motion Sensor - Home Assistant
Intro
In this article we will demonstrate how to turn on and off a light switch with an Inovelli Motion sensor.
How To
Turn the light on
Steps
- From the Home Assistant web interface click on the "Configuration" link.

- Click "Automations", then the "+" button, and then click on "Skip". We will be setting the automation up manually so there is no need to use the wizard.



- Input a name for your automation. We have chosen "Turn light on when motion detected".

- Next, choose "State" and specify the Inovelli 4-in-1 entity with the appropriate data. When the motion sensor is tripped on the device it reports a state of "8" to it's "burglar" entity. This is because in z-wave, that sensor has many available state options. 8 means that motion was detected in an unknown location. So, we are having this automation trigger when the motion sensor burglar state changes from 0 (no motion - or idle) to 8 (motion detected).

- Then, select the lighting device you want to control and the level that you want it to be changed to. In this automation we are controlling an Inovelli Red Series dimmer and settings it's level to 99%.
- Lastly, click on the "Save" (disk) icon to save the automation and test it out!

Turn The Light Off
The process is the same as above, but we will be slightly modifying the "trigger" and the "action".
Steps
- Create a new automation (shown above) and give it the appropriate name. We have chosen "Turn light off when no motion".

- In this automation lets set the trigger to be when the state of the "burglar" entity changes from 8 (motion detected) to 0 (no motion - or idle).

- Lastly we are going to choose the lighting device and set the action to turn it off.
- Click on the "Save" (disk) icon to finish the setup!

Conclusion
The article has demonstrated how to turn a light on and off based on the detection of motion in Home Assistant. The flexibility of HA is vast so there are many things you can do with this information. If there is something unique you are doing with your automations let us know in the Inovelli Community at
https://community.inovelli.com/.
Config File Data
If you want the information presented here to copy and paste into your "automations.yaml" file look below!
Turn light on
- - id: '1598033092203'
- alias: Turn light on when motion detected
- description: ''
- trigger:
- - entity_id: sensor.inovelli_lzw60_4_in_1_sensor_burglar_2
- from: '0'
- platform: state
- to: '8'
- condition: []
- action:
- - brightness_pct: 99
- device_id: 8539ffa0a5a4442f862bb61683dde9f6
- domain: light
- entity_id: light.inovelli_lzw31_sn_dimmer_red_series_level
- type: turn_on
Turn light off
- - id: '1598036089876'
- alias: Turn light off when no motion
- description: ''
- trigger:
- - entity_id: sensor.inovelli_lzw60_4_in_1_sensor_burglar_2
- from: '8'
- platform: state
- to: '0'
- condition: []
- action:
- - device_id: 8539ffa0a5a4442f862bb61683dde9f6
- domain: light
- entity_id: light.inovelli_lzw31_sn_dimmer_red_series_level
- type: turn_off