Changing Hue Color temp Automation

Hi. I’m attempting to set the color temp of my phillips hue using an automation. Any ideas how to modify this?


- id: '-1'
  alias: Cool lights for morning
  description: ''
  trigger:
  - at: "07:56:00"
    platform: time
  condition: []
  action:
    # color_temp: "400"
    entity_id: group.main
    data_template:
        color_temp: "400"

2 immediate issues: I’m not setting the color_temp correctly, and I’m not sure how to identify the lights. The automations I’ve set up before have been entities, and are identified using something like entity_id: switch.2302731368c63ae72c56. The Hue individual lights are classified by HA as devices, and the light groups, as set using the Hue app, are classified by HA as integrations.

I think I can work around issue 2 by following the auto-generated automation’s format when trying to turn lights on:

  action:
  - device_id: 3a489b139067423297bbfd0a0bec7645
    domain: light
    entity_id: light.hue_ambiance_lamp_1
    type: turn_on
  - device_id: 5fa1364301c042b2ae28cf2656934719
    domain: light
    entity_id: light.hue_ambiance_lamp_2
    type: turn_on

I’m not sure how to identify the lights. The automations I’ve set up before have been entities , and are identified using something like entity_id: switch.2302731368c63ae72c56 . The Hue individual lights are classified by HA as devices , and the light groups, as set using the Hue app, are classified by HA as integrations

Are you saying the hue integration didn’t generate a light.hue_XXXXX or whatever for each light?

Open dev tools and go to states at the top. The go to ‘filter entities’ and type “light”. I would hope these hue lights show up there!

If they do, you can make your own HA light group with these hue lights. I would recommend a light group if you control these lights the same all the time.

light:
  - platform: group
    name: hue_lamps
    entities:
      - light.hue_ambiance_lamp_1
      - light.hue_ambiance_lamp_2
- id: '-1'
  alias: Cool lights for morning
  description: ''
  trigger:
  - at: "07:56:00"
    platform: time
  condition: []
  action:
    service: light.turn_on
    data:
      entity_id: light.hue_lamps
      color_temp: "400"

You don’t need the group. You could just do 2 individual calls in a row…but if you usually control these lights together, a group is the way to go.

- id: '-1'
  alias: Cool lights for morning
  description: ''
  trigger:
  - at: "07:56:00"
    platform: time
  condition: []
  action:
    - service: light.turn_on
      data:
        entity_id: light.hue_ambiance_lamp_1
        color_temp: "400"
    - service: light.turn_on
      data:
        entity_id: light.hue_ambiance_lamp_2
        color_temp: "400"

Also, hope we’re not related! lol

Thank you very much… That fixed it!