@SylvainGa wrote:
Hi, first time poster and quite new to Home Assistant. So hopefully I’m not breaking any site etiquette with this post (and sorry for the long post).
I’m currently converting my Hue and Smartlife devices to Home Assistant through hass.io. I’m having a issue about controlling lights in Lovelace. I want to use a floor layout and position my lights at their corresponding location and it is working Ok but I’m having issues controlling the lights that allow dimming that way. Below is the floor plan for my ground floor.
Image may be NSFW.
Clik here to view.And Below is the curated version of the Lovelace script (only get the dimer to make things easier to read.
script: g_bright_mode: sequence: - service: light.turn_on data_template: entity_id: '{{ input_light }}' brightness: 255 color_temp: 226 elements: - entity: light.lumieredimmertest filter: saturate(.8) image: /local/lightbulb_on.png state_filter: 'on': brightness(120%) saturate(1.2) style: left: 62% top: 13% state_image: 'off': /local/lightbulb_off.png unavailable: /local/lightbulb_unavailable.png style: left: 62% rotate: 90 top: 13% tap_action: action: toggle hold_action: action: call-service service: script.g_bright_mode service_data: input_light: light.lumieredimmertest type: image image: /local/PlanRDC.png type: picture-elements
The tap action is working fine but the hold action is returning "Failed to call service script/g_bright_mode. Service not found.
You’ll see the script is there above the elements. I Tried to move it below as well as move it into scripts.yaml. To no avail, I can’t get it to work. If I replace “service: script.g_bright_mode” with “service:light.turn_on”, and change “input_light” for “entity_id”, I get instead “Failed to call service light/turn_on. must contain one of entity_id, area_id”.
If I move the call-service in the tap action instead of hold, it behaves the same way so I don’t think it’s related to it being in the hold section.
I already spent several hours on this, trying different things (the name of the script is actually something I found in a post in this community) and I’m stuck and can’t figure out what I’m doing wrong. Any help appreciated.
Edit: Replaced “service data” for “service_data”, copy/paste error.
Posts: 7
Participants: 2