tomoqv
(Tomas)
May 29, 2017, 4:00pm
1
I am trying to set up a condition for lamps, that I only want to turn on during the winter months. I tried to add something like this, but i didn’t work:
- condition: time month: - oct - nov - dec - jan - feb - mar
Anybody knows how to achieve this?
Thanks!
I don’t think it’s possible. Maybe you could create a template sensor to keep track of current month?
platform: template
sensors:
current_month:
value_template: "{{ now().month }}"
friendly_name: 'Current Month'
tomoqv
(Tomas)
May 29, 2017, 4:16pm
3
I am trying another condition instead:
condition: sun before: sunrise
I think that will accomplish what I am after, we’ll see tomorrow morning.
chrio
May 29, 2017, 9:41pm
4
This is what I’m using for evening lights:
- alias: eveninglights
trigger:
- platform: numeric_state
entity_id: sun.sun
value_template: '{{ state.attributes.elevation }}'
below: 5
condition:
condition: time
after: '13:00:00'
before: '01:00:00'
action:
service: scene.turn_on
entity_id: scene.evening
I prefer using an angle instead of the exact sunset since I want the lights on before the sun goes down, or it will be too dark inside already.
tomoqv
(Tomas)
May 30, 2017, 7:11am
5
Thanks,
that is a good one too. I will try that also.