Morning all,
Been having constant warnings about the history stats integration.
‘get_state was called from history_stats -this is a deprecated function’
‘state_changes_during_period was called from history_stats, this is a deprecated function’
Logger: homeassistant.components.history
Source: helpers/deprecation.py:122
Integration: History (documentation, issues)
First occurred: 08:24:29 (70 occurrences)
Last logged: 08:31:13
get_state was called from history_stats, this is a deprecated function. Use homeassistant.components.recorder.history.get_state instead, please report this to the maintainer of history_stats
state_changes_during_period was called from history_stats, this is a deprecated function. Use homeassistant.components.recorder.history.state_changes_during_period instead, please report this to the maintainer of history_stats
All of my sensors have the following syntax:
Is there anything wrong with this or is it just a bug in the core integration?
- platform: history_stats
name: Front house lights monthly
entity_id: switch.065354185002914ac44e_2_2
state: "on"
type: time
start: "{{ now().replace(month=states('input_number.start_month') | int, day=states('input_number.start_day') | int, hour=0, minute=0, second=0) }}"
end: "{{ now().replace(month=states('input_number.end_month') | int, day=states('input_number.end_day') | int, hour=0, minute=0, second=0) }}"