Hue motion sensors + remotes: custom component

o dear… thanks…:wink:

may I ask why you don’t only use the changing part in the payload? As far as I can understand this now (need some more studying… you change the time in the schedule to now().strftime(“%H”) but that’s the only thing changing in all sensors?

couldn’t you just ‘put’ that condition then, and not all the others per sensor? Or would that delete everything else?

like this:

- alias: "Nachtmodus wurde aktiviert"
    trigger:
      - platform: state
        entity_id: input_boolean.b_nightmode
        to: "on"
    action:
      # Bewegungsmelder Toilette 
      - service: rest_command.set_hue_rule
        data_template:
          id: 3
          payload: '{"conditions": {"address":"/config/localtime","operator":"in","value":"T07:30:00/T{{now().strftime("%H")}}:00:00"}
      - service: rest_command.set_hue_rule
        data_template:
          id: 5
          payload: {"address":"/config/localtime","operator":"in","value":"T07:30:00/T{{now().strftime("%H")}}:00:00"}
      - service: rest_command.set_hue_rule
        data_template:
          id: 14
          payload: '{"conditions":{"address":"/config/localtime","operator":"in","value":"T{{now().strftime("%H")}}:00:00/T07:30:00"}
      - service: rest_command.set_hue_rule
        data_template:
          id: 15
          payload: '{"conditions": {"address":"/config/localtime","operator":"in","value":"T{{now().strftime("%H")}}:00:00/T07:30:00"}
      - delay: "00:00:01"

Forget about the above_
I see I missed what you said here:

could you please tell me in words what you achieve by setting Nachtmodus aktiviert und deaktiviert. What actually changes in the Hue setup other than the actual time you do it.

(I am correct you dont actually switch on/off anything ?) Like we can set to ‘do nothing’ in the app, or set a scene, but I dont’ see you do that? Those would be my main reasons to try and do this all,

  • set day/night to do nothing , or set a scene
  • set sensitivity

btw @Martso have constructed this mapper, I think you wanted something like the too for the friendly_names? hop over to Map values for an input_select? and we can work this dedicated issue out without further disruption of this thread…