Get Philips Hue light flash 8 times or so

Hi everyone, I’m new to Home Assistant and I’m trying to carry over my automation from Ifttt. So far so good, the only issue I’m facing is to make my hue light flashing. In Ifttt I have an automation triggering a hue light flash when the CO2 level rises above a certain value. I was able to make the light flash also in Home Assistant but it flashes only once. I want to flash it 8 times or so. The light sits in a ceiling fan and is only there for this warning. After the flashing it should turn off again.
I’ve been checking this forum and other sites of course but couldn’t really find a solution. Again I’m new to this, so maybe I’m just stupid.
Anyone any idea?

I can’t help with ifttt as I don’t use it, but if your hue light is exposed to Home Assistant and I assume it is as you say you can make if lash singular, then the correct command for making it flash multiple times would be this:

service: light.turn_on
  flash: long
  entity_id: light.front_room_1

What type of C02 sensor is it, would I be right in assuming its not a sensor thats exposed / available to HA, hence the need for ifttt?

I managed to achieve it by adding first the action type: device - device: light - action: flash light. Then add action type: wait for time to pass (delay for 1 second). I then repeated to add these 2 action 7 times. Not very elegant but it works.

1 Like

Its a Netatmo sensor which is exposed to HA. I want to get rid of ifttt entirely

OK, getting rid of ifttt is a good idea.

Assuming the C02 sensor is a numerical sensor as it it shows an actual value rather than a binary sensor that shows simply on / off then you can achieve all of this within HA using a numerical trigger, something like this:

alias: Flash light on high C02
description: ''
mode: single
  - platform: numeric_state
    entity_id: sensor.your_co2_sensor  # EDIT
    above: '10' # EDIT - TO THE VALUE OF YOUR CHOICE
condition: []
  - service: light.turn_on
      flash: long
      entity_id: light.your_light  # EDIT
1 Like

You assume right, it does show an actual value. Am not yet familiar with scripts, I do everything via the UI of HA but let me try your proposal, thanks a lot rossk

The above is an Automation as it has a trigger, were as a script is a series of actions that you typically run manually and or call via some other means.

The above can be created in the Ui, just look for ‘numeric_state’ in the trigger drop down, then select your CO2 sensor and in the ‘below’ section simply put the appropriate value (I have no idea what this might be).

Then similarly under the action, service, you want to select ‘call a service’ and in the service box you want to select ‘light.turn_on’. Select your light and scroll to near the end and tick the box ‘flash’ and then tick the option ‘long’

Hey guys, I’m also new to this forum. And just want to say, I kinda had the same issue here, and thanks to your @rossk reply, I’ve also solved this problem. :smiley:

1 Like

Welcome and glad it helped :+1:

1 Like

it solved mine as well, thanks rossk


How do some apps (like Hue Disco) get the lights to actually strobe much faster?

Could you share the result code?