JensenNick / huawei_solar_pees

Power, Energy and Economy Sensors in Home Assistant
MIT License
33 stars 3 forks source link

Update huawei_solar_input.yaml - Initial Settings #48

Closed Roving-Ronin closed 2 months ago

Roving-Ronin commented 2 months ago

Add 'initial' setting to:

This sets a default value for when PEES is first installed, that is then overwritten by any subsequent user modifications.

JensenNick commented 2 months ago

There is no initial value set for the number input, because as I understand the documentation and Q&As in the forums the input number will revert to the initial value at reboot. I've not tested this myself yet, but even so it would make the most sense if the function of setting an initial value would be to return the initial value at reboot (think of this as a number value for i.e. brightness). I'd like to have confirmation from the developers before setting a initial value and I wouldn't set it for battery size and rated wp. Users need to understand what the numbers do and why they are set at what they are.

https://community.home-assistant.io/t/can-you-reset-a-number-input-to-its-original-default-value/565375

Roving-Ronin commented 2 months ago

The way that thread is reading is that the guy wants to reset the number back to the 'initial' number, IF/WHEN he has another sensor hit a certain reading/number. This then requires him to call the 'service: input_number.set_value' to do that. So if your not calling that service and tell it to reload the 'initial' number, then your setting remains as you last set/modified it.

i.e. First install the 'initial' number will be set. If you then change it to something else, when your restart/reboot it will remember the number it was last set to, and keep that number/setting when it starts up again.

Tested on one DEV sandpit and does that. Can test on another live HA soon.