Closed ghost closed 5 years ago
@ajdezigns commented on Apr 29, 2018, 11:58 AM UTC:
Both the sunset and sunrise conditions reset at midnight they can not both be used like your trying to do you will have to use the sun elevation setting instead
@fanaticDavid commented on Apr 29, 2018, 3:41 PM UTC:
Considering the OP is trying to add an or
condition to the code above, it is perfectly possible to combine those conditions in an automation.
@ajdezigns commented on Apr 29, 2018, 4:45 PM UTC:
I tried to do the Very same thing before and spent several hours trying to get it to work even opened a issue like this one and I was informed by several that it was not possible to combine sunset and sunrise in that manner
@mf-social commented on Apr 30, 2018, 8:17 AM UTC:
You were informed incorrectly.
Before sunrise OR after sunset is a perfectly valid condition set to establish if a light should be on, and is working perfectly for many users.
@Knoxie commented on Apr 30, 2018, 11:29 AM UTC:
Yes, this can work if you enter it manually in the Automation.yaml file and include the 'or' condition. It is only not possible from the UI due to the creation of conditions not allowing for an 'or' setup.
This issue was moved by iantrich to home-assistant/home-assistant-polymer#3924.
move[bot] commented on Apr 28, 2018, 9:36 AM UTC:
Knoxie commented on Apr 27, 2018, 3:08 PM UTC:
Home Assistant release with the issue: 0.67.1
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.): Docker, Unraid
Component/platform: https://www.home-assistant.io/components/automation
Description of problem: When using the Automation Builder from the UI there is no way to create 'or' conditions. They are automatically written to the automation.yaml and interpreted as 'and' conditions. I found this while trying to use the 'sun' condition and set a light to turn on with the condition that its between sunset and sunrise. But Hass uses after sunset as 'sunset to midnight' and 'midnight to sunrise' so those two things being added as an 'and' cannot be true for a specific time.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
This issue was moved by fabaff from home-assistant/home-assistant/issues/14120.
This issue was moved by zsarnett from home-assistant/home-assistant-polymer#1129.