jeeftor / HomeAssistant

This is my public home assistant stuff
45 stars 14 forks source link

Weather blueprint shows moon during day even if 'Only show moon if risen + night' is selected #4

Open koenvangils opened 1 year ago

koenvangils commented 1 year ago

Thanks for this great automation! The weather blueprint shows moon during day even if 'Only show moon if risen + night' is selected. Maybe a timezone issue? I'm located in the Netherlands.

jeeftor commented 1 year ago

I can work here -> but its prob easier to hit me on the discord for awtrix light ...

Can you drop in the all the info from the trace:

image

I can probably debug it from that info:

I'm guessing its these vars but can you drop the full set

moon: sensor.moon_phase
moon_phase: new_moon
moon_times: sensor.ip_geo_location
moon_rise: '06:16'
moon_set: '20:28'
moon_alt: 41.47987950945428
moon_risen: true
when_show_moon: always
show_moon: true
koenvangils commented 1 year ago

I think I found it. Line 623 in the yaml : {{state_attr('sun.sun', 'elevation') > 0 and moon_risen}}

should be

{{state_attr('sun.sun', 'elevation') < 0 and moon_risen}}

?

jeeftor commented 1 year ago

Just pushed that change... feel free to test it :)