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

Problem accessing 'trigger.from_state' following datas

$
0
0

@pploume wrote:

Hi,

Another un-understandable (for me) error :
as the code used :

trigger:
    platform: state
    entity_id: light.bureau
    #from: 'off'
    #to: 'on'
  action:
    - service: persistent_notification.create
      data_template:
        message: "c'est le message"
        title: "c'est le titre : {{ trigger.from_state.state }} ...."

I effectivelly get On/off (depending the state …)

I would like to access the friendly_name … with ‘trigger.from_state_friendly_name’
but I get nothing …

I’ve notice that ‘trigger.from_state’ give :

<state light.bureau=on; brightness=137, friendly_name=Bureau, supported_features=33 @ 2020-04-09T12:07:45.141192+00:00> 

with ‘;’ ending light.bureau while others are ending with ‘,’ …

How to access/read ‘friendly_name’ or ‘brightness’ ?

Thanks in advance

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 95377

Trending Articles



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