HA 0.117.1 Hue light.turn_on Flash Color

I’m trying to set up a Halloween automation in which my hue bulb would flash a specific color. I can get the bulb to change color, but it always flashes white.

  - service: light.turn_on
    data:
      transition: 0
      brightness: 255
      color_name: orangered
      flash: long
    entity_id: light.hue_lamp

I can’t say if this is a bug or even if it’s specific to 117, but I do know that I got this to work yesterday by splitting the service calls.

Remove the flash: parameter from the first call, then immediately call the service again with it. Should get the bulb to flash this way.

I had also tried that. First calling light.turn_on and setting the color and brightness which turns the bulb on, and then calling light.turn_on with flash: long but it still flashes white.

I have the same issue.
I am also not able to flash the light in a specific color. But not first with HA 0.117.1 already some versions before.

1 Like

I ended up just making a script that turned the light on and off repeatedly with delays in between and then calling that script in the automation. Wasn’t awesome but still worked.

This seems to be working fine for me.

I don’t know if there was a bug on earlier versions of 117, but on 117.5 it works as expected.

Still flashing white for me. Currently on 0.117.6

Are you using deconz by chance or Philips hue bridge?

Hue Bridge.

I’m guessing this is either a problem with deconz, or the deconz integration.

For anyone else having trouble with this and using deCONZ, check out the following

on Hue this error is reported:

[2674628112] 201: parameter, xy, is not modifiable. Device is set to off.
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 593, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 630, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 230, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/usr/src/homeassistant/homeassistant/components/hue/light.py", line 423, in async_turn_on
    await self.bridge.async_request_call(
  File "/usr/src/homeassistant/homeassistant/components/hue/bridge.py", line 144, in async_request_call
    return await task()
  File "/usr/local/lib/python3.8/site-packages/aiohue/lights.py", line 116, in set_state
    await self._request('put', 'lights/{}/state'.format(self.id),
  File "/usr/local/lib/python3.8/site-packages/aiohue/bridge.py", line 66, in request
    _raise_on_error(data)
  File "/usr/local/lib/python3.8/site-packages/aiohue/bridge.py", line 76, in _raise_on_error
    raise_error(data['error'])
  File "/usr/local/lib/python3.8/site-packages/aiohue/errors.py", line 28, in raise_error
    raise cls("{}: {}".format(type, error['description']))
aiohue.errors.AiohueException: 201: parameter, xy, is not modifiable. Device is set to off.

trying to flash: long with a color_name: red

and flashing white, so even the error seems incorrect, device is not off…

Same here, now running the 2021.1.0 version.
Tried to use the xy_color, but same problem comes up. It does not turn to red, stays the color that is set and stops flashing after a 10 seconds.

data:
  brightness: 255
  xy_color:
    - 0.672
    - 0.324
  flash: long

Trying to use it in a repeat sequence:

Logger: homeassistant.components.automation.alarm_inbraak_actions_lights_flashing_oranje
Source: components/hue/bridge.py:144
Integration: Automation (documentation, issues)
First occurred: January 6, 2021, 11:00:30 PM (9 occurrences)
Last logged: 1:22:08 PM

Alarm - Inbraak - Actions - Lights Flashing - Rood: Repeat at step 1: Error executing script. Unexpected error for call_service at pos 1: 201: parameter, xy, is not modifiable. Device is set to off.
Alarm - Inbraak - Actions - Lights Flashing - Rood: Error executing script. Unexpected error for repeat at pos 1: 201: parameter, xy, is not modifiable. Device is set to off.
While executing automation automation.alarm_inbraak_actions_lights_flashing_oranje
Alarm - Inbraak - Actions - Lights Flashing - Rood: Repeat at step 1: Error executing script. Unexpected error for call_service at pos 2: 201: parameter, xy, is not modifiable. Device is set to off.
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 250, in _async_step
    await getattr(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 457, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1445, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1480, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 593, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 630, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 230, in async_handle_light_on_service
    await light.async_turn_on(**params)
  File "/usr/src/homeassistant/homeassistant/components/hue/light.py", line 423, in async_turn_on
    await self.bridge.async_request_call(
  File "/usr/src/homeassistant/homeassistant/components/hue/bridge.py", line 144, in async_request_call
    return await task()
  File "/usr/local/lib/python3.8/site-packages/aiohue/lights.py", line 116, in set_state
    await self._request('put', 'lights/{}/state'.format(self.id),
  File "/usr/local/lib/python3.8/site-packages/aiohue/bridge.py", line 66, in request
    _raise_on_error(data)
  File "/usr/local/lib/python3.8/site-packages/aiohue/bridge.py", line 76, in _raise_on_error
    raise_error(data['error'])
  File "/usr/local/lib/python3.8/site-packages/aiohue/errors.py", line 28, in raise_error
    raise cls("{}: {}".format(type, error['description']))
aiohue.errors.AiohueException: 201: parameter, xy, is not modifiable. Device is set to off.

I don’t have experience with the hue bridge integration. But I did have a similar error with the deconz integration service deconz.configure. The solution in that instance was to include on: true in the data parameters and follow it up with an on: false action.

I don’t think light.turn_on has an on: true option, but you could possibly start with an action to turn the bulb on, then the flash action, and finally a light.turn_off action.

just found out that we can flash the Hue lights! in Color!

@D34DC3N73R 's thought are correct, first turn_on the light, and then use a service call:

flash: long
entity_id: light.kayon
color_name: red

Had transition in there before too, but that can be left out. The order doesnt matter (at least not in the developer-tools/service.

wait for the 15 flashes cycle to finish and one can change color (or not) and click call service again.
This can be scripted in a cycle probably

Will repost this in the latest blog on 2021.1, since I raised a New Years resolution…

and the solution is there: 2021.1: Happy New Year!

happy flashing!