Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensors for golden hour and blue hour #129

Open
voidzero opened this issue Aug 4, 2024 · 8 comments
Open

Sensors for golden hour and blue hour #129

voidzero opened this issue Aug 4, 2024 · 8 comments

Comments

@voidzero
Copy link

voidzero commented Aug 4, 2024

I was wondering if it's possible for you to add sensors for golden hour and blue hour. It would be eight additional sensors: blue/golden hour, dusk/dawn, start/end.

That way I could add them to my dashboard.

@voidzero
Copy link
Author

voidzero commented Aug 5, 2024

Just thinking out loud -- this morning I noticed that golden hour is taking too long:

image

I'm going by the times as displayed in my Mobile Observatory Android app. Here's a screenshot for that:

So golden hour for today at my location, according to this app, would be from 6:03 to 7:16 (elevation of the sun is between 0° and 10°) and tonight from 20:02 to 21:14.
Blue hour would be from between 4:57 and 5:48, and in the evening from 21:29 to 22:20 (elevation is between 8° and 2° below the horizon).

I wrote down all the times from Mobile Observatory, in order. There is some overlap.

	01 astro dawn 2:48
	02 nautical dawn 4:15
03 blue dawn start 4:55
	04 civil dawn 5:13
05 blue dawn stop 5:46
	06 sunrise 5:55
07 golden dawn start 6:02
08 golden dawn end 7:14
	09 transit culminatie 13:39
10 golden dusk start 20:03
11 golden dusk end 21:16
	12 sunset 21:22
13 blue dusk start 21:31
	14 civil dusk 22:04
15 blue dusk end 22:22
	16 nautical dusk 23:01
	17 astro dusk 0:31
	18 antitransit ondermeridiaan 1:39

@pnbruckner
Copy link
Owner

I was wondering if it's possible for you to add sensors for golden hour and blue hour. It would be eight additional sensors: blue/golden hour, dusk/dawn, start/end.

That way I could add them to my dashboard.

The phase sensor has three attributes -- blue_hour, golden_hour & rising -- that you could use to create (binary) template sensors. Would that help?

Or do you really need sensors that indicate when each of these periods start & end?

@pnbruckner
Copy link
Owner

Just thinking out loud -- this morning I noticed that golden hour is taking too long:

image

It looks like you're using Sun2's "deCONZ Daylight" sensor. That sensor was designed to mimic HA's built-in deCONZ Daylight Sensor. Even though the description implies the state is golden_hour_1 during the morning golden hour, that's not how it actually works. I think that sensor is very misleading, but like I said, it was made to mimic an already existing sensor. Someone had asked for that a long time ago because they had used the deCONZ Daylight Sensor for a long time, had automations based on it, but for whatever reason couldn't use the real integration anymore. So, I obliged and created this sensor. I don't actually think it's very useful. Which is why I created the phase sensor which I believe is much more useful.

So golden hour for today at my location, according to this app, would be from 6:03 to 7:16 (elevation of the sun is between 0° and 10°)

That's not the definition of golden hour that I have seen. FYI, the phase sensor (and its attributes) are based on blue hour being defined as the sun's elevation between -6 & -4 degrees, and golden hour being between -4 & +6 degrees.

@pnbruckner
Copy link
Owner

@voidzero you could also do what was suggested here:

https://community.home-assistant.io/t/enhanced-sun-component/63553/658

@voidzero
Copy link
Author

Hi Phil:

Much thanks and sorry for the delay with replying, I became very ill, my situation is improving now. I'll have a look and check back in. Thanks.

@pnbruckner
Copy link
Owner

No problem. Sorry to hear you've been ill, and glad to hear your condition is improving! Let me know if you have any other questions, or if you'd need help implementing any of the suggestions.

@voidzero
Copy link
Author

voidzero commented Sep 3, 2024

Thanks so much Phil. By the way, is this integration compatible with HACS version >= 2?

@pnbruckner
Copy link
Owner

By the way, is this integration compatible with HACS version >= 2?

I have no idea. I haven't tried upgrading HACS yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants