You should enter the template from my last post and then post the results
Unfortunately my ha is not in english so i try to translate:
Go to programmer tools → templates and then post the template from above. Haven’t you yet used this tool?
Yes it’s supported, I’m not sure what’s wrong but try using direct the entities of the group, when I have some time I’ll try change the script a bit
Please try the updated script from above. Should work also for you. Also please inform me if you have rgb lamps and non rgb lamps so to check if the script works for both of them
Thanks for making such a cool script! I have these lights that support a temperature and color, but the color is always dark, and was wondering there is a way to make it temperature only, or even a mix of both?
Just tried again, and I commented out (#) the “else” language that you said to remove. The script DID NOT work and again turned on every light.
To answer you question, almost all of my lights are dumb LED bulbs and smart light switches. So non-rgb.
What do you mean about dark colour? The lamps stay at dark red?
Can you please post a trace from the script along with the attributes of your lights?
Did you try the newest script I updated yesterday?
Can you post the trace?
Hi, yes, I tried it but it failed to work. I ended up deleting the else language as you suggested. So no lights turned on.
Here is my automation which calls the script:
id: '1695878887013'
alias: a Sunrise Script - Primary
description: ''
trigger:
- platform: time
at: '07:00:00'
condition:
- condition: state
entity_id: binary_sensor.workday_sensor
state: 'On'
action:
- service: script.sunriselights
data:
data:
duration: 30
target:
- light.light_switch_u_p_01_primary
brightness: 100
mode: single
You shouldn’t delete any else code in the new, updated script.
Is this light.light_switch_u_p_01_primary
an entity from a physical light bulb or a helper entity that you made and contain a physical switch?
Conditions for the script to work:
Passing entities that are not unavailable, unknown etc. when it’s called.
There is at least one light entity that meets the criteria.
If no entities are passed, all the available lights will be used.
If entities passed but don’t meet the criteria nothing happens.
The entities should have RGB LEDs , or have color temperature values, with the appropriate attributes in ha.
Lamps or light switches that are just on/off will not work.
I tested the script yesterday for RGB lamps and it works.
Also I need the trace from the script, not the automation that called it. Also the attributes from this entity if you think that it meets the criteria for the script
To answer you question, almost all of my lights are dumb LED bulbs and smart light switches. So non-rgb.
If by that you mean that all your lamps are just on/off bulbs, the script isn’t helpful at all for you…
- service: script.sunriselights
data:
data:
duration: 30
target:
- light.light_switch_u_p_01_primary
brightness: 100
Also you are calling the script false, there should be only one data:
block like in the example in the first post:
- service: script.sunriselights
data:
duration: 30
target:
- light.light_switch_u_p_01_primary
brightness: 100
RE: the double “data:” Agreed. I fixed this, and it still doesn’t work.
My bulbs are all dimmable LEDs, but they are not smart. The light switch is a dimming Z-wave light switch connected to HA via Zwave. The popular blueprint automation which incrementally increased brightness worked with these. But it had some quirks I didn’t like.
Without deleting this text (if I just comment it out), the commenting-out disappears when it’s run and the script turns on all lights when it has an error.
Sorry the script isn’t compatible with your lamps.
The only reason that it turns on all the lamps is because one didn’t pass any target:
argument. If you passed some entities and all the lights turned on it means that you have the old script saved.
As I wrote, the lamps should accept RGB or Color temperature adjustments, controllable by ha
I have problem with this error:
Message malformed: extra keys not allowed @ data[‘sequence’][0][‘sequence’]
OK, thank you. What doesn’t make sense is that the script works to incrementally turn on the lights. The issue is that it does that for all the lights in the entire house, not the ones I specify. So I think the script could work as I intend, but maybe I’m wrong.