`- alias: 'Salon Hue Sensor Turn Off'
trigger:
platform: state
entity_id: switch.hue_motion_sensor_salon
from: 'on'
to: 'off'
action:
service: telegram_bot.send_message
data:
message: 'Salon Hue Sensor Turned off'
- alias: 'Salon Hue Sensor Turn On'
trigger:
platform: state
entity_id: switch.hue_motion_sensor_salon
from: 'off'
to: 'on'
action:
service: telegram_bot.send_message
data:
message: 'Salon Hue Sensor Turned on'
`
Now, I would like to put an alarm (https://www.home-assistant.io/integrations/manual) in order to arm or disarm this sensor.
But Iām not sure about the relation between alarm control panel and the automations.yaml
Thanks for your help
A motion Sensor cannot be turned off, it turns itself off after a defined time. Problem with Hue sensors is that they turn off quite quickly. You can use the āforā attribute in your automationās trigger to compensate.
Iām sorry but iām not agree with you.
With my switch (in my first post) I can turn off or on my sensor (aka when Iām in my house, I donāt want that sensor detect me so I turn it off. Working well for the moment.
Ah, I see. Never tried that, but you could alternatively enable or disable the associated automation, based on your presence. Or you make your presence a condition in your automation.
fyi, Ive experimented in the past with the various options to switch the Hue motion sensors, and finally settled with these for all my motion sensors. I switch them on/off depending on the scenes and automations my House is in, and yes, when home mode away and alarm on, they are switched automatically accordingly. Works flawlessly:
which seemed to be the most reliable and lightest in the HA system. rest sensors take a lot of Ha and frequently cause issues (in my setup, so I use them a lightly as possible)ā¦
switching these is as simple as any other regular switch. Not sure what your challenge is in that aspect?
btw, Im using a reversed sequence: (automatically) selecting a home mode, which sets the motion sensors amongst others, and sets the alarm mode.
but, that really doesnāt matter. If you want to set the motion detection based on the state of the alarm, just use the alarm_panel state as trigger, and set the motion detection in a service_template based on the trigger.to_state.state.
I want to try your solution to turn off/turn on my Hue Motion Sensor, but Iām not sure about your code.
Sorry but Iām novice with HA.
Do you have an example of how integrate your code :
and get this error : Invalid config for [switch.command_line]: invalid slug binary_sensor.capteur_salon_motion (try binary_sensor_capteur_salon_motion) for dictionary value @ data['switches']. Got OrderedDict([('binary_sensor.capteur_salon_motion', OrderedDict([('friendly_name', 'Salon motion sensor switch'),
PS : āget_laundry_configā is script that you call to obtain the state ?