-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Dim (and brighten) lights via a remote #3309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
As per chat in the Discord, these are the scripts, automations, and input_sliders to allow a light to be dimmed and brightened by holding down the down or up button on an appropriate remote. This has been extended to use input_sliders for the dim/brighten step, and for the minimum and maximum brightness levels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The configuration appears that it would work, but I have requested a few minor changes to keep things politically correct.
entity_id: zwave.YOURCONTROLLER | ||
action: | ||
- service: script.turn_on | ||
data_template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change to data:
since data_template:
is not required here.
entity_id: zwave.YOURCONTROLLER | ||
action: | ||
- service: script.turn_off | ||
data_template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data_template
is not required here either.
data_template: | ||
entity_id: script.light_bright | ||
- service: script.turn_off | ||
data_template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nor here.
entity_id: zwave.YOURCONTROLLER | ||
action: | ||
- service: script.turn_on | ||
data_template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annnnd here.
entity_id: zwave.YOURCONTROLLER | ||
action: | ||
- service: script.turn_off | ||
data_template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here.
data_template: | ||
entity_id: script.light_dim | ||
- service: script.turn_off | ||
data_template: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I think this is the last one :)
entity_id: light.YOURLIGHT | ||
brightness: > | ||
{% set current = states.light.YOURLIGHT.attributes.brightness | int %} | ||
{% set step = states.input_slider.light_step.state |int %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency, please either remove the spaces around |
characters (my personal preference), or add a single space after this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are the last two changes!
@@ -115,11 +115,11 @@ script: | |||
data_template: | |||
entity_id: light.YOURLIGHT | |||
brightness: > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a hyphen/minus (-
) after the >
here to tell YAML to trim leading and trailing whitespace.
@@ -141,11 +141,11 @@ script: | |||
data_template: | |||
entity_id: light.YOURLIGHT | |||
brightness: > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a hyphen/minus (-
) after the >
here to tell YAML to trim leading and trailing whitespace.
More fixes ;)
This PR is currently causing Travis CI to fail on rebuild of the website:
|
Reverting until a solution is found. |
* Revert "Remove "Changing the icon" (#3305)" This reverts commit 6ae0daf. * Revert "Minor clarification in USPS component (#3316)" This reverts commit 3c6ff37. * Revert "Update rss_feed_template.markdown (#3314)" This reverts commit 6e154db. * Revert "Dim (and brighten) lights via a remote (#3309)" This reverts commit 21ca7ad.
@DubhAd Will you please wrap the templates with |
As per chat in the Discord, these are the scripts, automations, and input_sliders to allow a light to be dimmed and brightened by holding down the down or up button on an appropriate remote.
This has been extended to use input_sliders for the dim/brighten step, and for the minimum and maximum brightness levels.