I'm trying to create a simple automation that increases a dimmer switch's brightness attribute by 1% per minute until it reaches 100%. Can't seem to figure it out. In my "Then do" section, I have a "Repeat While Kitchen Lights (Attribute: Brightness) is Below 100%", Action: Increase Kitchen Lights Brightness (doesn't give me an option for an increment value), Action: Delay for 1 minute. My understanding is that this should, for as long as the brightness is less thatn 100, increase the brightness, wait a minute, increase brightness again, wait a minute, etc. but it never seems to increment the brightness at all...help?
#Increase brightness by 1% per minute until 100%
1 messages · Page 1 of 1 (latest)
so, just ran another test...looks like it did increase brightness by 10% (guessing this is a hard-coded default increment?), but the action never repeated
Hi @pearl flint,
If you don't share your code, no one will be able to help here...
Please use a code share site to share code or logs, for example:
- https://dpaste.org/ (select YAML for the language, and consider picking a longer expiry)
- http://pastie.org/ (select YAML for the language)
- https://paste.debian.net/ (you guessed it, select YAML as the language)
Please don't use Pastebin, since it can randomly add spaces to the main view. Please also don't share text as images since it makes it harder for people to help you. Remember that others may have colour blindness, impaired vision, etc.
or
To format your text as code, enter three backticks on the first line, press Enter for a new line, paste your code, press Enter again for another new line, and lastly three more backticks.
```yaml
example: here
```
Don't forget you can edit your post rather than repeatedly posting the same thing.
alias: new test
description: ""
triggers: []
conditions: []
actions:
- repeat:
sequence:
- device_id: 1cbdf8b891a7c53841da50b6227a90eb
domain: light
entity_id: dde944c3b65a8263bd8a8d9125ad959f
type: brightness_increase
- delay:
hours: 0
minutes: 1
seconds: 0
milliseconds: 0
while:
- condition: numeric_state
entity_id: light.kitchen_lights_light_1
attribute: brightness
below: 100
mode: single
I don't know why it stops, but mixing device_id stuff with state stuff is asking for trouble. I personally wouldn't use the device stuff at all, it was meant for use in the UI and is not intended for user written code.
https://community.home-assistant.io/t/why-and-how-to-avoid-device-ids-in-automations-and-scripts/605517
so, I actually built the automation in the UI...that's just the YAML it came up with
I would look up the current brightness percentage, add one to it, and send it to the light.
I'm still learning my way around HA and how to build the automations, and I can't write YAML to save my life...not quite sure how to do that
You have a good start there, use it as a base. I do do that myself. Then look in the forum or the blueprint exchange for someone using brightness percent stuff and use that.. Templates can be tested in the developer tab - templates.
Open your Home Assistant instance and show your template developer tools
cool, thanks!
If you are lucky someone will toss something together for you here, but I struggle working like that for others, my first 2 guesses are usually wrong. At this point I often know where to find the answer and know that there is an answer, but not the exact answer.
I'm sure it's probably something simple and I'm just not familiar enough with HA to know it off the top of my head