HI,
trying to overcome the max 255 character limit of a state card, I am using the customization on a sensor as follows:
sensor.map_totaal_actueel_sensors:
custom_ui_state_card: state-card-value_only
sensor is:
map_totaal_actueel_sensors:
friendly_name: Overzicht sensors actueel
unit_of_measurement: 'Watt'
value_template: >
{%-for state in states.sensor
if state.entity_id.endswith('actueel') and state.state|float > 0 %}
{{state.name[:-8]}}: {{state.state}}
{%-endfor%}
somehow the custom card won’t work since the 255 character error is flooding the log and preventing the system from loading completely.
Is this card not compatible any longer with current Hassio/Hassos setup?
I might even have seen in in .74, but it was only for log file entires and they change swiftly, so I didn’t bother. This now prevents the nice sensor from showing up… which really is too bad, since it does work in the dev-tool templating machine.
even like this:
map_totaal_actueel_sensors:
friendly_name: Overzicht sensors actueel
unit_of_measurement: 'Watt'
value_template: >
{{ '-'.ljust(30, '-') }} {{ '-'.ljust(30, '-') }}
{{ 'Entity ID'.ljust(30, ' ') }} {{ 'Actueel verbruik'.ljust(30, ' ') }}
{{ '-'.ljust(30, '-') }} {{ '-'.ljust(30, '-') }}
{%-for state in states.sensor
if state.entity_id.endswith('actueel') and state.state|float > 0 %}
{{state.name[:-8].ljust(30, ' ')}} : {{state.state.ljust(30, ' ')}}
{%-endfor%}
{{ '-'.ljust(30, '-') }} {{ '-'.ljust(30, '-') }}
'Count sensors :' {{ state_attr('sensor.total_sensors', 'count') }} 'totaal: ' {{ states.sensor|selectattr( 'entity_id','in',state_attr('group.iungo_actueel_verbruik','entity_id'))
|map(attribute='state')|map('int')|sum }}