I’m able to get the value properly. But when I want to use the statistics sensor to display the maximum value the last 30 days, it says that it’s not supported for this sensor. Is it possible to have statistics for custom sensor?
Invalid config for [sensor.statistics]: The configured characteristic 'max' is not supported for the configured source sensor. Got OrderedDict([('platform', 'statistics'), ('name', 'Högst dollarkurs senaste 30 dagarna'), ('entity_id', 'sensor.dollarkurs'), ('state_characteristic', 'max'), ('max_age', OrderedDict([('days', 10)])), ('unique_id', 'max_dollarkus')]). (See ?, line ?).
This is how I configure the statistics:
- platform: statistics
name: "Högst dollarkurs senaste 30 dagarna"
entity_id: sensor.dollarkurs
state_characteristic: max
max_age:
days: 30
unique_id: "max_dollarkus"