Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106043

Cover template: trying to start a script for "position" that sets a brightness level on a light

$
0
0

Hey,
I am trying to build a simulated cover to play with cover automations. This is what I have got so far, which is working:

cover:
  - platform: template
    covers:
      HAL9000_cover_sim:
        device_class: blind
        friendly_name: "HAL9000_cover_sim"
        open_cover:
          service: script.open_cover
          data:
            modus: 'open'
        close_cover:
          service: script.close_cover
          data:
            modus: 'close'
        stop_cover:
          service: script.stop_cover
          data:
            modus: 'stop'

Pretty much the example from the docs, but the underlying scripts are turning lights on and off, so the simulation works.

Now I try to also simulate the position. The docs tell me to call the script like this:

        set_cover_position:
          service: script.position_cover
          data:
            position: "{{position}}"    

But I am struggeling to get the script to take “position” and translate it to a RGB value. This
grafik
does not work.
Level two would be to multiply the level by 2.55 to use themax brightness range of the lights.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>