Commit graph

16 commits

Author SHA1 Message Date
Clayton Nummer
ff4854e7b7 Version bump for master 2020-06-11 13:09:31 -04:00
Clayton Nummer
976a35e109
Merge branch 'dev' into master 2020-06-03 21:05:42 -04:00
Clayton Nummer
03718f0e3c Version bump for (deprecated) custom updater 2020-03-19 15:49:30 -04:00
Clayton Nummer
abe47adc86 Version bump for (deprecated) custom updater 2020-03-07 10:16:13 -05:00
Clayton Nummer
6c26f5dbe1 Version bump for (deprecated) custom updater 2020-02-21 22:16:31 -05:00
Clayton Nummer
db7d0574dd Bump version for services hotfix, and fix typo 2020-02-12 23:04:10 -05:00
Clayton Nummer
108f13aced
Bump custom_updater.json to 1.0.9
I'm an idiot and forgot people are still using Custom Updater...doh.
2019-08-20 19:05:53 -04:00
Clayton Nummer
f3a1a73885 Remove configuration options from entity attributes
The biggest concern is that apparently any device_class with longitude, latitude, and elevation will show up on the HA map (not just device_tracker). In general, however, configuration options in attributes is extraneous and the community voted to remove them (https://community.home-assistant.io/t/circadian-lighting-custom-component/61246/355)
2019-06-14 16:27:28 -04:00
Clayton Nummer
4f332a514c Re-write of values calculation
The basis of Circadian Lighting is to figure out how to adjust lights to mimic the sun, which is roughly parabolic above and below the horizon. Originally I used three points to calculate the parabolas - sunrise, sunset, and solar noon/midnight. I did a bunch of generic arithmetic to generate the parabola from those three points. The problem is that this arithmetic generates a parabola from _any_ three points - in reality the points I have are the intercepts and vertex.

The problem with the old method is that if solar noon/midnight did not fall exactly between sunrise and sunset then the calculated vertex could be more or less than 100%, which would cause the integration to set color/brightness values above or below the set min/max. Generating a parabola from the intercepts and vertex is much simpler and also should guarantee the min/max are what's expected. 

In addition to this change, I'm also now calculating 4 "half" parabolas instead of just one for above horizon and one for below horizon. The "half" parabolas are: sunrise->solar-noon, solar-noon->sunset, sunset->solar-midnight, solar-midnight->sunrise. This is necessary for the case where solar noon/midnight don't fall exactly half way between sunrise and sunset, which is especially prevalent for users who specify a specific time for sunrise or sunset but not both.

I'm embarrassed at how it's been before it dawned on me that I could calculate the parabolas from intercepts/vertex rather than the three random points method, but hopefully this fixes inconsistencies for users - it should definitely fix issue #25!
2019-06-01 14:20:47 -04:00
Clayton Nummer
34d5529a05 Increment version
for added manifest.json and services.yaml
2019-05-09 13:25:48 -04:00
Clayton Nummer
e66bea0695 Increment version 2019-04-05 15:35:45 -04:00
Clayton Nummer
d70e7d0c91 Remove time_zone configuration variable
astral seems to only be compatible with with deprecated time zone strings, and because times returned are timezone aware the calculations still work properly.
2019-04-04 22:57:17 -04:00
Clayton Nummer
16377d26e9 Remove const.py from custom_updater.json resources 2019-04-04 22:20:54 -04:00
Clayton Nummer
2d135ca119 Improve getting astral times
Include time_zone and elevation to get more accurate times. Always pass date into get_sunrise_sunset (otherwise it was returning inconsistent results). Add some debug logging.
2019-04-04 22:01:15 -04:00
Clayton Nummer
de1180be7a Include updated_atfor custom_updater
hopefully custom_updater starts working
2019-04-03 16:30:57 -04:00
Clayton Nummer
e80f45b90b Initial push
with new folder structure and custom_updater support (hopefully)
2019-04-03 15:35:39 -04:00