Add Hue motion sensor sensitivity and schedule

as topic, we still dont have the sensitivity and schedules that are set on the motion sensors.

Currently I need to have sets of command_line

command_line:

  - sensor:
      unique_id: hue_sensors
      command: !secret hue_sensors_command
      value_template: >
        {{value_json|length}}
      json_attributes:
        - '185' # Bijkeuken
        - '5' # Gang
        - '28' # Gang voorkamer
        - '192' # Gang vijver
etcetc

or rest sensors and templates built on those,

template:

##########################################################################################
# sensitivity
##########################################################################################

  - sensor:

#1
      - unique_id: bijkeuken_motion_sensor_sensitivity
        state: >
          {{state_attr('sensor.hue_sensors','185').config.sensitivity}}
        <<: &customize
          icon: >
            mdi:numeric-{{this.state}}-box-multiple-outline

and to retrieve the sensors in HA. Also need some rest_command services to ‘set’ sensitivity,

script:

  set_hue_sensitivity:
    mode: restart
    sequence:
      - service: rest_command.set_hue_command
        data:
          command: config
          type: sensors
          message_body: >
            {% set sensi = {'Low':'0','Medium':'1','High':'2'} %}
            {% set state = states('input_select.hue_indoors_sensitivity') %}
            {% set sensitivity = sensi[state] if state in sensi %}
            {"sensitivity": {{sensitivity}} }
          id: >
            {% set sensors =
              {'Bijkeuken':'185',
               'Eetkamer':'52',
               'Voordeur':'128',

               'Kelder':'7',
               'Zolder':'12'} %}
            {% set state = states('input_select.hue_motion_sensor') %}
            {% set id = sensors[state] if state in sensors %}
            {{id}}
      - delay: 5
      - service: homeassistant.update_entity
        target:
          entity_id: sensor.hue_sensors

or schedule (which was only for V1 api, and now no longer functional)

would be very nice if Core integration ‘simply’ provided those sensors, and an interface to control them

and we could do away with all of those rest command_line template scripts…