I am using the auto-entities card to display forecast solar PV generation per hour like so:
type: custom:auto-entities
card:
type: entities
title: Solcast Hourly Forecast
show_header_toggle: false
entities:
- type: custom:template-entity-row
icon: mdi:sun-clock
name: Forecast for 00:00 to 01:00
state: >-
{{state_attr('sensor.solcast_pv_forecast_forecast_today',
'detailedHourly')[0]['pv_estimate'] }}
- type: custom:template-entity-row
icon: mdi:sun-clock
name: Forecast for 01:00 to 02:00
state: >-
{{state_attr('sensor.solcast_pv_forecast_forecast_today',
'detailedHourly')[1]['pv_estimate'] }}
Which produces a card like this:
I would like to filter out lines that have a zero value for pv_estimate using the filter function like but I am struggling with the 'nested, attributes:
filter:
exclude:
- attributes:
pv_estimate: "=0"
Any ideas how to do this? TIA