Closed andreas-bulling closed 9 months ago
When I put sensor.battery_status for secondary_info it shows that exact string instead of the status itself.
Post a SHORT code with your attempt to show a state in the secondary_info.
This is the template sensor (battery_status
):
{% if states('sensor.victron_vebus_battery_current_227') | float < 0 %}
Discharging
{% elif states('sensor.victron_vebus_battery_current_227') | float > 0 %}
Charging
{% else %}
Standby
{% endif %}
And this is the bit in the frontend
type: vertical-stack
cards:
- type: custom:multiple-entity-row
name: Battery
entity: sensor.victron_battery_soc
show_state: false
state_color: true
secondary_info: sensor.battery_status
entities:
- entity: sensor.victron_vebus_battery_current_227
name: Current
format: precision1
styles:
font-size: 20px
- entity: sensor.victron_battery_voltage
name: Voltage
format: precision2
styles:
font-size: 20px
- entity: sensor.victron_battery_soc
name: SOC
format: precision1
styles:
font-size: 20px
Your code does not show a state in secondary_info because this part is wrong. Check docs.
secondary_info:
entity: sensor.battery_status
Suggest to ask similar questions in the dedicated community thread and leave GitHub for reporting bugs and proposing FRs.
Thanks for the hint. I did go through the documentation in detail and tried many things. After I failed I thought it might be a bug and opened the issue. Maybe an example for how to use an entity this way would help.
Various pre-defined information can be shown in
secondary_info
but what does not seem to be possible is to show values/states of an entity or template sensor - in my case the charging state of a battery. When I putsensor.battery_status
forsecondary_info
it shows that exact string instead of the status itself.