Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Howto add wattpilot_totally_charged to energy dashboard #14

Closed
dibi73 opened this issue Nov 3, 2022 · 7 comments
Closed

Howto add wattpilot_totally_charged to energy dashboard #14

dibi73 opened this issue Nov 3, 2022 · 7 comments

Comments

@dibi73
Copy link

dibi73 commented Nov 3, 2022

it should be easy to bring the wattpilot_totally_charged to the energy dashboard. But I don't have a clue what I'm doing wrong - it is not possible to add it to the "individual devices". Perhaps the name of the sensor must be wattpilot_energy_total instead of wattpilot_totally_charged ?
or the class should be "energy" not "power"?

@tpreugsc
Copy link

tpreugsc commented Nov 3, 2022

I added
sensor.wattpilot_totally_charged:
state_class: total
device_class: energy

into my customize.yaml or under "homeassistant:" in configuration.yaml

@dibi73
Copy link
Author

dibi73 commented Nov 3, 2022

Thanks for the hint. I added to the configuration.yaml:

homeassistant:
  customize:
    sensor.wattpilot_totally_charged:
      state_class: total
      device_class: energy

I could insert the device in the energy dashboard!

Now i just have to wait until my wife comes home with the car to try loading... I'll report tomorrow eveneing

@tpreugsc
Copy link

tpreugsc commented Nov 3, 2022

26E18056-7579-46B7-B1CD-F406824DBF10
Believe me, it works!

@dibi73
Copy link
Author

dibi73 commented Nov 5, 2022

Thank you. As you said, it works perfectly. How can this be changed in the wattpilot-ha, so that this workaround is no longer necessary?

@mk-maddin
Copy link
Owner

Added as default functionality wihtin: ea17d53

@tpreugsc
Copy link

tpreugsc commented Nov 14, 2022

I hate to say it, but:
without the mentioned lines
sensor.wattpilot_totally_charged:
state_class: total
device_class: energy
in the customize section it still misses the correct energy (?) class:

Bildschirm­foto 2022-11-14 um 09 39 38

@mk-maddin
Copy link
Owner

yes - I see it looks like the "state_class" property is not take over... even it is detected.

2022-11-23_18-22-51

even when my logging tells me the property is set :(
At the moment I am out of ideas...

2022-11-23 18:14:54.510 DEBUG (MainThread) [custom_components.wattpilot.sensor] 05a7fd4af25510dbdfe9fdc26ea8f946 - async_setup_entry sensor: Reading static yaml configuration
2022-11-23 18:14:54.538 DEBUG (MainThread) [custom_components.wattpilot.sensor] 05a7fd4af25510dbdfe9fdc26ea8f946 - async_setup_entry sensor: Getting charger instance from data store
2022-11-23 18:14:54.538 DEBUG (MainThread) [custom_components.wattpilot.sensor] 05a7fd4af25510dbdfe9fdc26ea8f946 - async_setup_entry sensor: Getting push entities dict from data store
2022-11-23 18:14:54.598 DEBUG (MainThread) [custom_components.wattpilot.sensor] Wattpilot - eto: _init_platform_specific: specified state_class is: total)
2022-11-23 18:14:54.752 INFO (MainThread) [custom_components.wattpilot.sensor] 05a7fd4af25510dbdfe9fdc26ea8f946 - async_setup_entry: setup 22 sensor entities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants