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

Get the state / brightness off a ligh

$
0
0

@pploume wrote:

Hi,

Still having difficulties to play around with HA templating …

What I want to do :
get the state of a lamp and/or read it’s brigthness
and send it to rhasspy’s tts (tts works perfectly …)

What I have in automation.yaml :slight_smile:

 - alias: 'rhasspy GetState'
  trigger:
    - platform: event
      event_type: rhasspy_GetState
    - platform: state
      entity_id: light.bureau
  action:
    - service: rest_command.tts
      data_template: 
        payload: >
          {% set myState = light.bureau.attributes %}
         State is {{myState}}

Log file : Error rendering data template: UndefinedError: ‘light’ is undefined

There is something i’m missing …

Thanks for your help
:slight_smile:

Posts: 3

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95437

Trending Articles



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