Skip to content

Use of Charge Slots Action #37567

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

Open
GeordiePorker opened this issue Feb 19, 2025 · 7 comments
Open

Use of Charge Slots Action #37567

GeordiePorker opened this issue Feb 19, 2025 · 7 comments
Labels
integration: ohme Stale The PR had no activity for quite some time, and is marked as Stale

Comments

@GeordiePorker
Copy link

Feedback

Regarding the ACTION: LIST CHARGE SLOTS section.

### Issue 1:

It would be useful to explain to people how to find the "config_entry" id and indeed how to pass that data to the action to retrieve the result. Perhaps it's my lack of experience, but finding an answer took around 2 hours of googling and a lot of frustration.

For example, within the table:

"The config entry of the account to get the charge list from. This can be found by opening a Terminal and typing "cat /config/.storage/core.config_entries | jq" and looking for the "entry_id" field in the Ohme integration (identified as the config entry with a domain of "ohme"). It must be entered in capitals"

(I acknowledge there may be a better method, but this is the one which worked for me).

### Issue 2:

It would be useful to include an example template sensor which populates with the charge slots each time the charger is plugged in (for example). Unfortunately I cannot provide an example because I am still trying to make this part work!

URL

https://www.home-assistant.io/integrations/ohme/

Version

2025.2.4

Additional information

No response

@home-assistant
Copy link

Hey there @dan-r, mind taking a look at this feedback as it has been labeled with an integration (ohme) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of ohme can trigger bot actions by commenting:

  • @home-assistant close Closes the feedback.
  • @home-assistant rename Awesome new title Renames the feedback.
  • @home-assistant reopen Reopen the feedback.
  • @home-assistant unassign ohme Removes the current integration label and assignees on the feedback, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information) to the feedback.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information) on the feedback.

@GeordiePorker
Copy link
Author

Whoops, I hit 'send' too soon. The code to make the action work (ref ### Issue 1) is:

action: ohme.list_charge_slots
data:
config_entry: 1234567890ABCDEFGHIJKLMNOP

(I mention this because the Developer Tools -> Actions tab does not usefully guide a user towards the correct answer)

@dan-r
Copy link
Contributor

dan-r commented Feb 21, 2025

For me the dev tools > actions tab gives me a dropdown that lets me select my account. The go to yaml button then shows the config entry ID.

Image

@JRKyte
Copy link

JRKyte commented Feb 21, 2025

I too am interested in some better docs around issue 2 above.

I simply cannot get my template sensor to return anything but an array with 1 item, which is a string of all the charging slots, which I can’t do much with.

- trigger:
    - platform: time_pattern
      minutes: /15
    - platform: homeassistant
      event: start
  action:
  - action: ohme.list_charge_slots
    data:
      config_entry: {config_entry_id}
    response_variable: charging_slots
  sensor:
  - name: Ohme charging slots
    unique_id: cheap_charge_slots
    icon: mdi:lightning-bolt
    state: "{{ charging_slots.slots | count() }}"
    attributes:
      events: "{{ charging_slots.slots }}"

Would love a simple example in the docs, where I can return the same array of slots as the action in a template sensor to use on my dashboard.

@GeordiePorker
Copy link
Author

@dan-r , please accept my apologies...I was in YAML mode and therefore didn't see that dropdown/selector.

I might still suggest including this hint in the documentation, because none of the googling I did led me to using UI Mode to select the integration (identified in an easy to read format of my email address!) and then moving to YAML mode to find the ASCII string which one might need when pulling together an automation / script to actually conduct the action usefully.

I remain stuck with ### Issue 2, however and I remain unable to fetch the array and place it in the attributes of a useable sensor / helper / set of helpers.

But that said, I am sorry about ### Issue 1 - fully my bad!

@dan-r
Copy link
Contributor

dan-r commented Feb 25, 2025

Both,

In terms of the documentation, I think it'd be something needed on a wider scale than just this integration so if you find an area you think this would fit, it might be worth a separate issue.

On the topic of charge slots sensor, I've added it to the core version under home-assistant/core#139203 and it behaves in the same way as in the HACS version, so no need for any templating. If you want notifications on this, it should be as simple as setting up an automation when the value moves from unknown to anything. This will be in the March release which should begin beta testing very shortly.

Copy link

github-actions bot commented May 1, 2025

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved.
If this issue is still relevant, please let us know by leaving a comment 👍
This issue has now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale The PR had no activity for quite some time, and is marked as Stale label May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration: ohme Stale The PR had no activity for quite some time, and is marked as Stale
Projects
None yet
Development

No branches or pull requests

3 participants