slashback100 / presence_simulation

Home Assistant Presence Simulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add/minus time element

Wright55 opened this issue · comments

I have just implemented your code and it works well, but have an issue with the lights currently coming on too early. With the lighter summer nights light are coming on too early. I have many lights using presence detection based on the suns elevation. During tests lights are on before they need to be, I can see that with the darker nights later in the year they will all br later than required.
Any chance of an option to add/reduce a set number of minutes as an option

I personally don't add those kind of lights in the simulation.
I don't really understand your proposition to add/reduce a number of minutes though

It is not so much the way I have lights turn on, as if I physically turn lights on at sunset, then using a delta of 7, lights then turn on 7 days later if using the simulation at the time of 7 days ago. With the lengthening day during the summer then lights can come on some 10/15 minutes early. Shorter days will have a similar effect coming on later. Adding the ability to add/reduce minutes would address this issue.
Other than that a great holiday solution.

I think Wright55 means that you have to incorporate sunset in the time shift.
If you are away for let say a week it is not a very big problem but being away from home for let say a month then you are allready having a time difference that can be more than an hour.

I understand. But the time shift would have to be done in one direction the evening, and in the other direction the morning.
The best solution would be, from my point of view, to have a flag 'follow sun rising/setting evolution'. And if selected, get the rising/setting time of the day, compairing it to the one 1 week ago (that could be retrieve thanks to the sun integration), and add/remove the delta the morning/evening...

I was thinking a manual adjustment, but I like the idea of your solution. Being a 67 year old non techie (but can get by using HA).