nice! thanks you for sharing this, Ill add that immediately!
please help me out, I’d like to add some extra flexibility, by using an input_select for the id, (i have 11 sensors)… and have the service use a variable for id, that can either be taken from that input_select, or maybe an automation sending a few motion sensor id’s to that script
would something like this work:
in secrets file:
hue_command: http://HUE_BRIDGE_IP/api/APIKEY/{{ type }}/{{ id }}/{{ command }}
in a package:
rest_command:
hue_command:
url: !secret hue_command
method: put
payload: '{{ data }}'
automation:
- id: set_motion_sensitivity
trigger:
[some_trigger]
action:
service: rest_command.hue_command
data:
command: config
data: >
{ "sensitivity": "{{states('input_select.set_hue_sensitity')}}" }
id: >
{{states('input_select.select_hue_motion_sensor')}}
type: sensors
input_select:
set_hue_sensitivity:
name: set Hue sentitiviy
options:
- 0 #low
- 1 #medium
- 2 #high
input_select:
select_hue_motion_sensor:
name: Select motion sensor
options:
- 5
- 7
- 12
- 22
- 28
- 33
- 44
- 48
- 52
- 56
- 60
another question:
Im trying to read the times for the day and night, as you might have seen. Now you are using a put command, and since my curl command_line sensor doesn’t work without implicating the sensors behavior, i was thinking maybe using a get command could get those schedule times too?
needing to extract value in {“address”:“/config/localtime”,“operator”:“in”,“value”:“T07:30:00/T{{now().strftime(”%H")}}:00:00"}
see: Hue motion sensors + remotes: custom component - #687 by Mariusthvdb
for a (each) motion sensor?
is that what you do in HA:
if so, that is exactly what I am trying to accomplish, next to be able to read it and display it in HA…!
buried in the rules I can find this for all motion sensors:
MotionSensor 5.day-on is {“address”:“/config/localtime”,“operator”:“in”,“value”:“T06:45:00/T22:45:00”}
MotionSensor 5.day-dark-on is {“address”:“/config/localtime”,“operator”:“in”,“value”:“T06:45:00/T22:45:00”}
MotionSensor 5.night-on is {“address”:“/config/localtime”,“operator”:“in”,“value”:“T22:45:00/T06:45:00”}
MotionSensor 5.night-dark-on is {“address”:“/config/localtime”,“operator”:“in”,“value”:“T22:45:00/T06:45:00”},
… so. a lot of the same info… what would be wise to select in order to be able to set the schedule from HA