Describe the bug
Not strictly speaking a bug, but the template provides hints of things to provide to document the issue, so I'm using the bug report template.
I have existing data (approximately 16 months) for load and solar production in kW (and kWh).
I can (and have) set up template sensors to convert kW to W, but they only have data from the moment that I set them up an hour or so ago this afternoon while setting up EMHASS.
The issue is that if I want to (and I do want to) use the machine learning forecaster module, there is no way (that I can see) of training it on my historical data.
To Reproduce
Steps to reproduce the behavior
Create a template sensor based off the native kW sensor that converts the reading (load or PV production) from kW to Watts as required by EMHASS
Expected behavior
Ideally the history of the kW sensor would be available for EMHASS to use, but that's not the way HA works.
If EMHASS allowed you to specify the Unit of Measure for var_PV and var_load where existing sensors were in kW, it would avoid this issue.
For example:
# Configuration file for EMHASS
retrieve_hass_conf:
freq: 30 # The time step to resample retrieved data from hass in minutes
days_to_retrieve: 365 # We will retrieve data from now and up to days_to_retrieve days
var_PV: 'sensor.blah_s_powerwall_solar_power' # Photovoltaic produced power sensor
var_PV_UoM: kW
var_load: 'sensor.blah_s_powerwall_load_power' # Household power consumption sensor (deferrable loads should be substracted)
var_load_UoM: kW
Screenshots
Base Sensor in kW
New Sensor in W - only shows data from point it was created:
History Chart showing current month showing source data and template sensor:
Template Sensor Definition
List of load related entities (including templated sensor)
Home Assistant installation type
Home Assistant Core
Your hardware
OS: Linux (Ubuntu)
EMHASS installation type
Docker
Additional context
Add any other context about the problem here.
Describe the bug Not strictly speaking a bug, but the template provides hints of things to provide to document the issue, so I'm using the bug report template.
I have existing data (approximately 16 months) for load and solar production in kW (and kWh).
I can (and have) set up template sensors to convert kW to W, but they only have data from the moment that I set them up an hour or so ago this afternoon while setting up EMHASS.
The issue is that if I want to (and I do want to) use the machine learning forecaster module, there is no way (that I can see) of training it on my historical data.
To Reproduce Steps to reproduce the behavior
Expected behavior
For example:
Screenshots Base Sensor in kW![image](https://github.com/davidusb-geek/emhass/assets/37993507/a199f402-681b-4ac8-ab1a-e6807781c0e6)
New Sensor in W - only shows data from point it was created:![image](https://github.com/davidusb-geek/emhass/assets/37993507/a42d6076-56fb-4ea7-88f2-cf97034d9921)
History Chart showing current month showing source data and template sensor:![image](https://github.com/davidusb-geek/emhass/assets/37993507/ec6ba2f2-3172-4b38-b802-cd1366837ac6)
Template Sensor Definition![image](https://github.com/davidusb-geek/emhass/assets/37993507/45a06256-2e9b-4295-88f5-ed707c887778)
List of load related entities (including templated sensor)![image](https://github.com/davidusb-geek/emhass/assets/37993507/0d7d35a2-be25-48c6-a417-91236bc085ad)
Home Assistant installation type
Your hardware
EMHASS installation type
Additional context Add any other context about the problem here.