You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- platform: emby_upcoming_mediaapi_key: !secret apikeyuser_id: !secret useridhost: !secret hostport: !secret portssl: falsemax: 5use_backdrop: falseinclude:
- Film
- Serie TV
Describe the bug
The component is working, but the "data" attribute is a string and not an object so it's not usable with jinjia in HA.
Please could you make the "data" attribute an object?
thanks
{{ states.sensor.emby_latest_film.attributes.data is string }} gives true
{{ state_attr('sensor.emby_latest_film', 'data') is string }} gives true
the above code is not working because the data attribute is a string:
{% set data = state_attr('sensor.emby_latest_film', 'data') %} {{ data[1].title }}{%- if data[1].release is none -%} ({{ data[1].aired.split('-')[0] }}){% else %} ({{ data[1].release }}) {% endif %}
Version of the custom_component
Emby Latest Media 0.3.4
Configuration
Describe the bug
The component is working, but the "data" attribute is a string and not an object so it's not usable with jinjia in HA.
Please could you make the "data" attribute an object?
thanks
the above code is not working because the data attribute is a string:
I see that people using the component Plex Recently Added Component (https://github.com/custom-components/sensor.plex_recently_added) that gives a similar "data" attribute can use Jinjia templates with HA.
THE SOLUTION SEEMS TO BE:
replace attributes["data"] = json.dumps(card_json)
with attributes['data'] = card_json
in sensor.py
Debug log
The text was updated successfully, but these errors were encountered: