hass-circadian_lighting
hass-circadian_lighting copied to clipboard
Blue Hours enhancement
def calc_colortemp(self): if self.data['percent'] > 0: return ((self.data['max_colortemp'] - self.data['min_colortemp']) * (self.data['percent'] / 100)) + self.data['min_colortemp'] elif -10 < self.data['percent'] < 0: return ((10000 - 2500) * (abs(self.data['percent'] / 10))) + 2500 else: #return self.data['min_colortemp'] return 10000
I've made this simple hack in order to got the "Blue Hour", obviously we could be parametrized with vars.
Feel free to add it if you want.
Can you explain what you do to make this work @terminet85 ?