I have this
Happy camper
so i added
MIN MAX
#=======================================================================
#
#=======================================================================
- platform: min_max
name: tank temperature max
type: max
entity_ids:
- sensor.feeder_ds18b20_temperature
- sensor.tank_temperature_max
#=======================================================================
#
#=======================================================================
- platform: min_max
name: tank temperature min
type: min
entity_ids:
- sensor.feeder_ds18b20_temperature
- sensor.tank_temperature_min
#=======================================================================
#
#=======================================================================
Now I want the MIN/MAX for the last 7 days
so I thought this would work
- platform: history_stats
name: feeder max last 7
entity_id: sensor.tank_temperature_max
type: time
state: '°C'
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
duration:
days: 7
- platform: history_stats
name: feeder min last 7
entity_id: sensor.tank_temperature_min
state: '°C'
type: time
start: "{{ now().replace(hour=0, minute=0, second=0) }}"
end: "{{ now() }}"
duration:
days: 7
BUT I GETTING THIS ERROR
Invalid config for [sensor.history_stats]: You must provide exactly 2 of the following: start, end, duration. Got OrderedDict([('platform', 'history_stats'), ('name', 'feeder max last 7'), ('entity_id', 'sensor.tank_temperature_max'), ('type', 'time'), ('state', '°C'), ('start', '{{ now().replace(hour=0, minute=0, second=0) }}'), ('end', '{{ now() }}'), ('duration', OrderedDict([('days', 7)]))]). (See ?, line ?).
Invalid config for [sensor.history_stats]: You must provide exactly 2 of the following: start, end, duration. Got OrderedDict([('platform', 'history_stats'), ('name', 'feeder min last 7'), ('entity_id', 'sensor.tank_temperature_min'), ('state', '°C'), ('type', 'time'), ('start', '{{ now().replace(hour=0, minute=0, second=0) }}'), ('end', '{{ now() }}'), ('duration', OrderedDict([('days', 7)]))]). (See ?, line ?).
what am i missing
think it something to do with the state but I dont know what to put there.