I’d like to insert a co2 alarm system detected by the netatmo sensor that when it reaches the level of 1000 or more this value turns on a red light (possibly intermittent) on the xiaomi gateway.
this is the sensor of co2 sensor.netatmo_cucina_co2 and this is the gateway I mentioned: light.gateway_light_f0b4299a4613.
the red light should remain on for 5 minutes and then turn off or return to its original state.
I’m trying to enter the condition but I’m not succeeding.
thank you
you need to post what you have so far. make sure you post the code in the proper format per the blue box above.
- id: 'Co2 Camera Letto' alias: Co2 Camera Letto trigger: platform: numeric_state entity_id: sensor.netatmo_camera_da_letto_co2 above: 950 condition: condition: sun after: sunrise before: sunset action: - service: light.turn_on data: entity_id: light.gateway_light_286c07891747 brightness: 255 rgb_color: - 255 - 0 - 0 - delay: 0:10 - service: light.turn_off data: entity_id: light.gateway_light_286c07891747
the second automation looks ok syntax-wise.
what is it not doing that you want it to do?
i think that now is ok
I can’t make the light flicker for 1 minute. do you know how it is possible to do this?
if you want the light to turn on & off for a minute it’s not going to be easy depending on the flash rate you want.
I think the best way would be to use a for-loop in a template but I’m not certain how to do that.
with a script?
you could do it with a script or automation but if you want a fast flash rate (every second or so) and you try to hand code it the code is going to get really long. it becomes less long if you want a slower flash rate. I think that is one of the limitations of automating in HA.
How often do you want it flash?
every 2 second for 2 minute
yeah, unless you can figure out how to do that in a loop of some kind then the length of that code would be immense if you needed to hard code every off/on cycle.
Hey Matteo
Have you finally find a way to implement your behaviour?
I’m actually looking for something quite similar. Flash the light every time a measured CO2 value (I think Netatmo measures every 10 minutes) is above 1000 ppm.