Bas Nijholt
|
46a74cb5a5
|
prepend async_ to turn_on and turn_off
|
2020-09-05 20:09:56 +02:00 |
|
Bas Nijholt
|
618234259d
|
transition should always exist
|
2020-09-05 17:39:19 +02:00 |
|
Bas Nijholt
|
37ac31c3c6
|
to_state will always be on
|
2020-09-05 15:08:26 +02:00 |
|
Bas Nijholt
|
a464189ce0
|
Fix case when from_state is None, closes #111
Made this commit on my phone and didn't test it yet.
|
2020-09-05 15:02:52 +02:00 |
|
Clayton Nummer
|
d0e195f04b
|
Merge pull request #110 from basnijholt/dev
add one more _LOGGER line
|
2020-09-04 12:44:31 -04:00 |
|
Bas Nijholt
|
9074b9fe71
|
add one more _LOGGER line
|
2020-09-04 18:34:20 +02:00 |
|
Clayton Nummer
|
7289957ce8
|
Merge pull request #107 from basnijholt/styling
Rewrite and simplify code
|
2020-09-04 10:51:06 -04:00 |
|
Bas Nijholt
|
0264aeaa09
|
add a more useful debug message for state changing
|
2020-09-04 16:18:45 +02:00 |
|
Bas Nijholt
|
dee9dd10f8
|
run black
|
2020-09-03 23:56:48 +02:00 |
|
Bas Nijholt
|
ed9389a1e7
|
make the switch async to ensure all light adjusting happens at the same time
|
2020-09-02 09:38:21 +02:00 |
|
Bas Nijholt
|
becc846287
|
component -> platform
|
2020-09-01 20:02:23 +02:00 |
|
Bas Nijholt
|
368bc9fddc
|
shorten self._lights_types construction
|
2020-09-01 20:02:13 +02:00 |
|
Bas Nijholt
|
92d367e3bc
|
unify _sleep_state_changed and _disable_state_changed into _state_changed
|
2020-09-01 18:26:42 +02:00 |
|
Bas Nijholt
|
25cbcf635b
|
remove ._manual_time dict
|
2020-09-01 18:16:11 +02:00 |
|
Bas Nijholt
|
f02be53d3f
|
make methods private
|
2020-09-01 17:58:51 +02:00 |
|
Bas Nijholt
|
ce19976c5e
|
fixes from previous commit
|
2020-09-01 17:28:38 +02:00 |
|
Bas Nijholt
|
9e03d5aeeb
|
remove arg in get_sunrise_sunset and call update in __init__
|
2020-09-01 16:44:24 +02:00 |
|
Bas Nijholt
|
4c9d1f6659
|
use async functions and call trackers/listeners in the correct place
|
2020-09-01 16:40:29 +02:00 |
|
Bas Nijholt
|
b70191d634
|
rename once_only -> only_once
|
2020-09-01 12:45:10 +02:00 |
|
Bas Nijholt
|
6ffddbda61
|
remove unused import and code
|
2020-09-01 12:44:02 +02:00 |
|
Bas Nijholt
|
76b544682e
|
fix typos and use self._brightness
|
2020-09-01 12:38:44 +02:00 |
|
Bas Nijholt
|
98efae7e40
|
be explicit in unpacking RGB
|
2020-09-01 00:23:49 +02:00 |
|
Bas Nijholt
|
9dc04bc7c1
|
remove code that wasn't needed
|
2020-09-01 00:11:36 +02:00 |
|
Bas Nijholt
|
d865cdbf9f
|
remove unused attributes
|
2020-09-01 00:01:34 +02:00 |
|
Bas Nijholt
|
1fd9d4764c
|
be consistent with brackets
|
2020-08-31 23:59:04 +02:00 |
|
Bas Nijholt
|
49a0e461d7
|
introduce self._lights_types
|
2020-08-31 23:57:16 +02:00 |
|
Bas Nijholt
|
29010105c1
|
change elif in if when returning
|
2020-08-31 23:46:36 +02:00 |
|
Bas Nijholt
|
3475bd9b90
|
date is never None and renames
|
2020-08-31 23:41:36 +02:00 |
|
Bas Nijholt
|
13bbdd4ad4
|
create _replace_time method
|
2020-08-31 23:24:19 +02:00 |
|
Bas Nijholt
|
063a2386af
|
add @log decorator
|
2020-08-31 22:50:33 +02:00 |
|
Bas Nijholt
|
080aeed541
|
add _is_disabled property and move logging to more logical place
|
2020-08-31 22:31:26 +02:00 |
|
Bas Nijholt
|
e257af03bf
|
call self._update_switch in light_state_changed
|
2020-08-31 17:47:41 +02:00 |
|
Bas Nijholt
|
e058091f52
|
allow CONF_SLEEP_STATE and CONF_DISABLE_STATE to be lists and add defaults
|
2020-08-31 17:47:41 +02:00 |
|
Bas Nijholt
|
1f8324c065
|
more simplifications
|
2020-08-31 17:47:35 +02:00 |
|
Bas Nijholt
|
d9deee9e52
|
simplify calc_percent
|
2020-08-31 12:00:21 +02:00 |
|
Bas Nijholt
|
c1af45d46a
|
set self._brightness in __init__
|
2020-08-31 10:36:29 +02:00 |
|
Bas Nijholt
|
1150c58658
|
Fix syntax
|
2020-08-31 00:57:46 +02:00 |
|
Bas Nijholt
|
b9ca03be9c
|
simplify self._entity_id
|
2020-08-31 00:40:53 +02:00 |
|
Bas Nijholt
|
875542650e
|
more simplifications and renames
|
2020-08-31 00:39:41 +02:00 |
|
Bas Nijholt
|
5ff9be0090
|
create ._time dict
|
2020-08-31 00:27:52 +02:00 |
|
Bas Nijholt
|
a59b03eb67
|
remove ._attributes
|
2020-08-31 00:22:32 +02:00 |
|
Bas Nijholt
|
d4551746c6
|
do not define a .data dict
|
2020-08-31 00:20:25 +02:00 |
|
Bas Nijholt
|
dfa0f8cc60
|
renames
|
2020-08-31 00:15:32 +02:00 |
|
Bas Nijholt
|
2f9a6d7706
|
implement once_only and remove _attributes
|
2020-08-31 00:06:34 +02:00 |
|
Bas Nijholt
|
7ef47b19c8
|
which can never not be set
|
2020-08-27 23:47:28 +02:00 |
|
Bas Nijholt
|
88d3555614
|
assign brightness variable
|
2020-08-27 23:40:59 +02:00 |
|
Bas Nijholt
|
b7daa6c05c
|
make light_* empty lists instead of None
|
2020-08-27 23:35:22 +02:00 |
|
Bas Nijholt
|
c5e4486f00
|
simplify setting brightness
|
2020-08-27 23:32:32 +02:00 |
|
Bas Nijholt
|
5491c7dcf1
|
simplify color settings
|
2020-08-27 23:22:38 +02:00 |
|
Bas Nijholt
|
6050e99189
|
move lines into if statement
|
2020-08-27 23:18:04 +02:00 |
|