I am running the new Solcast integration successfully. I want to display hourly values in an entity card using the ‘custom entity row’ add in thus:
type: entities
title: Solcast Hourly Forecast
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']|round(4) }}
- 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'] }}
- type: custom:template-entity-row
icon: mdi:sun-clock
name: Forecast for 02:00 to 03:00
state: >-
{{state_attr('sensor.solcast_pv_forecast_forecast_today',
'detailedHourly')[2]['pv_estimate'] }}
This works quite well except for the zero rows in the night.:
I would like to hide those rows but the displayed ‘0’ are not actually zero numbers. I suspect that Solcast doesn’t send data if there isn’t a positive forecast to save bandwidth, but how can I detect these rows and then hide them? TIA.