Rdoull
(RDoull)
October 27, 2018, 6:42pm
1
Hi All…
ok I have no idea what I am doing, but i think its possible.
i have an automation working that turns the lights on 45mins before sunset and off again at a predetermined time.
however when its cloudy/raining (and in Scotland its always raining) it gets duller earlier, so i’d like the lights to turn on earlier in this circumstance, also in the summer i dont need the lights, so need to stop them coming on at all at that time.
my problem, i dont know where to start. I’ve read the help pages, followed as best i could and got lost. I’ve got an API key for darksky and added it to my configuration.yaml (should i remove the default weather settings?)
any help is greatly appretiated. thank you
gumbo
October 27, 2018, 7:43pm
2
Your first step is to create a sensor based upon dark_sky_cloud_coverage and use that to trigger an automation.
Here are a few older threads which discuss items similar to what you want to do:
I am attempting to create an automation that turns on some lights when it becomes overcast outside (only during the day). I am using the Dark Sky component and I am currently using the dark_sky_cloud_coverage sensor for the automation trigger. This attribute can have some odd peaks at times, so I want to only trigger when it has been above 70% for the last three polls (polling every 10 minutes). I have attempted to add a “for” statement in the trigger and in the condition. Both return errors in …
I am trying to setup a very simple automation based on cloud cover obtained from the Dark Sky sensor. I am using the following code directly inspired from the “Rainy Day” automation example:
- alias: 'Rainy Day'
trigger:
platform: numeric_state
entity_id: sensor.dark_sky_cloud_coverage
above: 70
action:
service: light.turn_on
entity_id: light.light_2
The action part works perfectly, the cloud cover is currently 99 percent, still the light does not turn on. If I use a d…
How about this?
It is true if the sun is below horizon and the hour is greater or equal to 16
or
the visibility is Very Poor, Poor or Moderate.
you could probably extend it to use the seasons sensor
sensor:
# True if sun is below horizon and time is greater than 16:00 or visibility is Very Poor, Poor or Moderate
needlights:
entity_id:
- sun.sun
- sensor.met_office_visibility
friendly_name: Need lights
value_template: "{{(states.sun.sun.attributes.elevation|float < 2 an…
makai
October 28, 2018, 10:01am
3
I use a binary sensor:
- platform: template
sensors:
dark_outside:
entity_id: sensor.dark_sky_cloud_coverage
friendly_name: Dark outside
value_template: '{{ states.sensor.dark_sky_cloud_coverage.state|float > 60 }}'
I then I use this binary sensor in my automation:
condition:
- condition: state
entity_id: binary_sensor.dark_outside
state: 'on'
Rdoull
(RDoull)
November 14, 2018, 9:17pm
4
Thank you and sorry for my late reply.
I’ve been unable to get to my computer for some time though this has helped thank you.
Rdoull
(RDoull)
November 14, 2018, 9:18pm
5
Thank you and sorry for my late reply.
I’ve been unable to get to my computer for some time though this has helped thank you.
I’ll have a look through those links shortly and hopefully be able to better understand what I am trying to do.