Template Sensor help please

Hello

I have created a template sensor to pull 2 items from the meteoalarm component. but on the 2nd one it shows just unknown, but when I try it in dev tools, template it works. Any idea please? is it the length, if so how can I get it to work?

  - platform: template
    sensors:
      weather_warning:
        value_template: '{{ (states.binary_sensor.meteoalarm.attributes.headline) }}'
  - platform: template
    sensors:
      weather_warning1:
        value_template: '{{ (states.binary_sensor.meteoalarm.attributes.description) }}'

Full sensor output from meteoalarm

binary_sensor.meteoalarm	on	language: en-GB
category: Met
event: Yellow Snow/Ice Warning
responseType: Prepare
urgency: Immediate
severity: Moderate
certainty: Likely
effective: 2020-03-11T21:00:00+00:00
onset: 2020-03-11T21:00:00+00:00
expires: 2020-03-12T10:00:00+00:00
senderName: Go to UK Met Office
headline: Yellow Snow/Ice Warning for United Kingdom - North East
description: snow may bring some travel disruption from Wednesday evening through Thursday morning. Showers are expected across the northwest of the UK from Wednesday evening onwards, these falling as sleet and snoweven to low levels at times away from exposed coasts. Some accumulations of snow are expected, mostly above around 150 m where more than 2 cm is likely in places. In addition an area of rain will move across parts of southern Scotland and northern England on Wednesday evening, again with some snow possible but this mostly above 200 m. Surfaces will remain wet from this rain and the showers with icy stretches expected to form.
instruction: BE AWARE of widespread snow and/or ice on roads and pavements. Localized disruption of outdoor activities.  Take care when walking, cycling or driving due to slippery surfaces.
web: http://meteoalarm.eu/en_UK/0/0/UK007.html
attribution: Information provided by MeteoAlarm
friendly_name: meteoalarm
device_class: safety

It is. The state of your sensor will be greater then 255 chars and so it fails.

What would you like to do with the sensors?
UI? Take a look at the markdown card.

1 Like

Nice one thanks. Will have a play with this.