Closed whistlebare closed 4 months ago
What would you like to see? A numerical representation of the operating mode or a textual one, e.g either "1", "2", "10", ... or "Self consumption", "Auto", "Time of Use" ... ? Should be fairly easy to add. Now, if you could provide some spare time ... ;)
I'm sorry dude...I'll sign your overtime sheet for you ๐
Personally I'd like a textual representation.
Thanks Stefan
On 27 Feb 2024 at 13:48, stefan @.***> wrote:
What would you like to see? A numerical representation of the operating mode or a textual one, e.g either "1", "2", "10", ... or "Self consumption", "Auto", "Time of Use" ... ? Should be fairly easy to add. Now, if you could provide some spare time ... ;)
โ Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Perhaps this helps? I am using this as a template sensor:
- sensor:
- name: Sonnebatterie - Betriebsmodus
unique_id: pv_sonnen_betriebsmodus
state: >
{% set x = states('sensor.sonnen_status_operatingmode') | int(0) %}
{{ {1: 'Manuell',
2: 'Automatisch (Eigenverbrauch)',
6: 'Modul-Erweiterung',
10: 'Time-of-use'}.get(x, 'Unknown state') }}`
{% set x = states('sensor.sonnen_status_operatingmode') | int(0) %}
Where do you get that from, I can't find that sensor in my HA. What version of the Sonnenbatterie integration are you using?
Something like that ok:
?
Sorry I guess this is my own REST sensor :-). I can post the config for that later
@whistlebare -> https://github.com/weltmeyer/ha_sonnenbatterie/pull/47
Sorry I guess this is my own REST sensor :-). I can post the config for that later
Won't help much since the current version of the integration doesn't provide the operating mode. So there's no way to convert it using your nifty template ;)
Closed by #47
That is perfect, thanks so much Stefan๐๐ผ
On 27 Feb 2024 at 14:48, stefan @.***> wrote:
Something like that ok:
sb_operatingmode.png (view on web)
?
โ Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Well thank you for your effort. But I think 1 ist not "self consumption", this is 2. 1 is "manual" which means you can/must control charge/discharge manually with the REST API via /api/v2/setpoint/discharge or charge.
Thanks again for your great work, i've been using your integration to change my battery's operating modes via automations and all is fine. I was wondering if there is a way of obtaining the status of the actual mode in which the battery is currently running? I'd like to add an entity to my HA so i can visually see if it is in Manual, Self consumption or TOU mode. Is that a thing already? If not how easy would that be to add? Would it be as simple as reading the current value and then setting a flag? (excuse my ignorance as i'm not a programmer in the slightest)