I have started to use HA for about six months now; I am now trying to learn how to use automation and it seem harder than vera lite. I just wanted to make an automation using Aeotec muti sensor;
where it shows up on my HA 0.67.1 as switch.family_motion_sensor and binary.family_motion_sensor.
If family motion sensor is armed AND tripped AND motion is detected. turn on switch.livinglight and send me a message.
Anyone can point me to the right direction? Thanks in advance!
How do you intent to “arm” this sensor? I mean i don’t think it can be armed by itself.
Thanks Sebast, It is my intention to set a timer to arm it at 11pm every night. Yet to work out how to do that yet.
In Vera, I am able to set a scene by; > new scene>select the device, choose daily, choose a time, click on Arm.
For the other automation in Vera> new scene>choose the device>choose from drop down box>a device is armed and tripped>action: send message and email to me.
You can setup an automation for when motion detected and if it’s after 11pm, turn on a light and send a message, I’m not sure what you mean by the above.
I’m using the manual alarm panel component for arming and tripping motion sensors.
The state of this manual alarm panel is used as a condition in my automations.
So if motion detected (trigger) and alarm panel is armed (condition) then do something (action)
There’s a manual alarm control panel that sounds ideal for the “armed” part.
The docs show how you could alarm, and “trip” the alarm.
Thanks Tinkerer, I will try to see if i can get it working.
I have managed t get the sensor to turn a light on when tripped using automation by HA:
`- action:
- data:
entity_id: switch.golf_51
service: switch.turn_on
alias: Motion Detected Family Motion Sensor
condition: []
id: ‘1527854863058’
trigger: - entity_id: binary_sensor.family_motion_sensor_95
from: ‘off’
platform: state
to: ‘on’I then add some code on the automation.yaml manually to try turn hallway light on at a certain time if it is off but this part of code don't work. But both automation do show up on HA. Full automation.yaml code as follow.
- action: - data:
entity_id: switch.golf_51
service: switch.turn_on
alias: Motion Detected Family Motion Sensor
condition: []
id: ‘1527854863058’
trigger: - entity_id: binary_sensor.family_motion_sensor_95
from: ‘off’
platform: state
to: ‘on’ - alias: ‘turn on Hallway at a time’
trigger:
platform: state
entity_id: switch.hallway_40
to: ‘off’
condition:
condition: time
after: ‘22:35:00’
before: ‘06:00:00’
action:- data:
entity_id: switch.hallway_40
service: switch.turn_on`
Anyone can tell me what have I don’t wrong?
- data:
Posting it again to try do it the right way if possible:
First part of the automation: motion detected works; second part turn on hallway at a time do not work. both automation show up without any error:
`- action:
- data:
entity_id: switch.golf_51
service: switch.turn_on
alias: Motion Detected Family Motion Sensor
condition: []
id: ‘1527854863058’
trigger: - entity_id: binary_sensor.family_motion_sensor_95
from: ‘off’
platform: state
to: ‘on’ - alias: ‘turn on Hallway at a time’
trigger:
platform: state
entity_id: switch.hallway_40
to: ‘off’
condition:
condition: time
after: ‘22:35:00’
before: ‘06:00:00’
action:- data:
entity_id: switch.hallway_40
service: switch.turn_on`
- data:
For this Automation, are you trying to turn on switch.hallway_40 if switch.hallway_40 is turned off between 22:35:00 and 06:00:00?
Thanks Coolie1101; I am trying to turn on hallway switch between 22:35:00 and 6:00.00 if it is not on already. when I got it working, I will use this code to arm the binary sensor between that time.
I am a newbee for Home Assistant automation, I can build a house very well but still learning how to use this HA automation to replace my Vera Lite in the near future. Seems to be fund using HA. Thanks for your respond.
So on motion, you want to turn on switch.golf_51, and if switch.hallway_40 is off and its between 22:35 and 06:00 turn on switch.hallway_40?
Correct; Thanks
O; better explain this way. on motion, if binary sensor is armed and motion detected, turn on switch.golf
Arm montion sensor between 22.35 and 6.00 on separate automation
I’m not getting this part, how can you arm the motion detector?
In Aeotec motion sensors it show up in HA as binary_sensor for detect motion AND it also show up as switch_sensor for me to arm it by switching it ON.
If I got the switch_hallway working, I will replace it with switch_sensor to arm the sensor.