Commit graph

11 commits

Author SHA1 Message Date
Philipp Ehses
b73f1e0455 Fixes day/night detection and an indentation bug
Day/night detection is used in sensor.yaml to select the appropriate
weather icon (e.g. 'sunny' vs 'night'). The previous if condition
did not work for the weather_condition_x states, when the _now state
was in a different part of the day/night cycle.
This commit should fix this issue, as long as weather_condition_x is
not too far in the future (not more than one day or night phase).

Additional bug fix:
- fix an indentation bug in weatherman.yaml
2022-12-27 23:35:45 +01:00
Madelena Mak
bea4430721
Fix motion detection sensor 2022-11-07 22:17:31 -08:00
Madelena Mak
6778aee12c Add motion sensor binary sensor 2022-11-07 23:59:11 -05:00
Stephen Ludgate
7a6f5c98eb
Correct nigh time symbols when Sun has set
I didn't notice a bug in my nigh time symbol check to make the Moon symbols appear after Sun set. Turns out when the Sun has set, the original code was checking the setting of the FOLLOWING day, so the condition was never met, so night time symbols during night were reverting to day time. 

This update checks if Sun has set or not, and checks for appropriate rising or setting times depending if Sun has set or not.

(future update would be to swap out Sun rising and setting times with Sun dusk and dawn times, as a bright Sun icon for 8pm (here in UK in summer) looks odd when it is getting dark, meh, maybe?!  ¯\_(ツ)_/¯
2022-08-30 12:21:40 +01:00
Madelena Mak
21681de0da
Formatting 2022-07-10 08:34:51 -07:00
Madelena Mak
fdaf752a7b
Fix bracket bug 2022-07-10 08:33:20 -07:00
Stephen Ludgate
b270fed855
Update sensor.yaml
error with using && - changed to and.
2022-07-09 09:10:40 +01:00
Stephen Ludgate
42b8176ed1
Update sensor.yaml
typo - missing brackets
2022-07-08 21:07:11 +01:00
Stephen Ludgate
dada2d74d5
Update sensor.yaml
Updated the checks to check between sunrise and sunset for the forecast time - looks better!
2022-07-08 20:46:15 +01:00
Stephen Ludgate
5c83360b83
Night Time Clear (sunny) and Partly Cloudy Updates
With met.no weather feed to Home Assistant - there's no difference in night time weather and daytime - specifically a clear night and partly clear night. 

A Clear sky is classed as a "sunny" state, even at night. I have added some checks in the HA yaml template to check if the Sun sensor (You need Sun in your Home Assistant install) is state = "below_horizon" and update "sunny" and "partlycloudy" to be "night" and "night-partly-cloudy". This then requests icons in the ESPHome yaml to include the Moon - which makes it look right when you are looking at the display at night, or when the upcoming forecast hours are night time - a clear night sky = the Moon, not the Sun.

Or at least it makes more sense in my eyes to see the Moon icons at night that seeing a clear Sunny day predicted for 2AM(!!) :)
2022-07-08 11:50:36 +01:00
Madelena Mak
a4e5bb224f Add weatherman and sensor code 2022-06-28 00:27:32 -04:00