Skip to content

Rewrite and simplify code#107

Merged
claytonjn merged 70 commits into
claytonjn:devfrom
basnijholt:styling
Sep 4, 2020
Merged

Rewrite and simplify code#107
claytonjn merged 70 commits into
claytonjn:devfrom
basnijholt:styling

Conversation

@basnijholt

@basnijholt basnijholt commented Aug 25, 2020

Copy link
Copy Markdown
Contributor

I have simplified and rewritten a lot of the code.

In addition, I have added the functionalities:

  • add only_once option to switch, which makes the light change to the correct value only when turning it on (or disabled_state, sleeping_state switch). This is useful when you want to manually change the settings of the lights sometimes and make it stay.
  • add ability to make sleep_state and disable_state lists of options. For example when using an input_select where something should be disabled on multiple states. This is a non-breaking change because it also accepts just a single string.
  • The switch is now fully async, which means that when adjusting the lights, all lights get the service call simultaneously.

@basnijholt basnijholt changed the title run black, pyupgrade, and isort Simplify code and lint with black, pyupgrade, and isort Aug 25, 2020
@claytonjn

Copy link
Copy Markdown
Owner

Thank you, this was much-needed. I built this upon the flux component because I had never programmed in python before so things had definitely gotten quite messy. Will test ASAP.

@basnijholt

Copy link
Copy Markdown
Contributor Author

@claytonjn, I wrote you on Discord. Maybe it's easier to discuss things there 😄

@claytonjn claytonjn changed the base branch from master to dev September 4, 2020 14:50
@claytonjn claytonjn merged commit 7289957 into claytonjn:dev Sep 4, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Sep 26, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Sep 26, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Sep 26, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Sep 26, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Sep 26, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Oct 13, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Oct 16, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Oct 16, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Oct 17, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Oct 17, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Oct 18, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Oct 19, 2020
basnijholt added a commit to basnijholt/home-assistant that referenced this pull request Dec 19, 2020
@RubenKelevra RubenKelevra deleted the styling branch January 8, 2022 08:14
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

Successfully merging this pull request may close these issues.

2 participants