Skip to content
View in the app

A better way to browse. Learn more.

Power Forum - Renewable Energy Discussion

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Home Assistant Eskom Prepaid

Featured Replies

18 hours ago, rgt.dnl said:

@Sc00bs Thanks for this. Unfortunately I cannot get this to work. I had to manually create the templates as the code was giving errors. I am actually using the Home | Home Assistant Glow 🌟 (glow-energy.io) mentioned by @hilt_ctn above as the total grid use number. I am almost certainly doing something wrong because the nothing updates. I suspect the issue is in the script but i can't see what is wrong there -

alias: Update Prepaid Units
sequence:
  - service: input_number.set_value
    target:
      entity_id: input_number.enter_prepaid_units_from_meter
    data:
      value: '{{ states(''input_number.enter_prepaid_units_from_meter'') | float }}'
  - service: input_number.set_value
    target:
      entity_id: input_number.prepaid_units_left
    data:
      value: '{{ states(''sensor.prepaid_units_left'') | float }}'
  - service: input_number.set_value
    target:
      entity_id: input_number.initial_prepaid_units
    data:
      value: '{{ states(''input_number.initial_prepaid_units'') | float }}'
  - service: input_datetime.set_datetime
    target:
      entity_id: input_datetime.last_update
    data:
      datetime: '{{ now().strftime(''%Y-%m-%d %H:%M:%S'') }}'
mode: single

Check that you have the correct sensor name from your inverter integration @rgt.dnl

You will need to change it in 3 places in the code. 

If you don't have a separate YAMl file for scripts, the scripts.yaml part will just go into the configuration.yaml file 

 

 

 

 

Edited by Sc00bs

On 2024/06/07 at 6:34 PM, Sc00bs said:

Check that you have the correct sensor name from your inverter integration @rgt.dnl

You will need to change it in 3 places in the code. 

If you don't have a separate YAMl file for scripts, the scripts.yaml part will just go into the configuration.yaml file 

 

 

 

 

Thanks @Sc00bs actually, I got what i needed out of two of the helper sensors which I renamed to make more sense for my use case -

I basically used the following which seems to be enough for me. image.thumb.png.e81d1f62e12bb9d2ef5dda97dd1b5e05.png

image.thumb.png.d5ff646ce433bf36019fa27315f9f7d0.png

(Yes, something wrong with IAMMETER reading. Not sure why.)

Edited by rgt.dnl

  • 4 weeks later...

I'm looking for something similar to this but I am not on prep paid. I would just like a simple counter that mimics my actual meter reading so I can view it in ha. Ie: if I can input my current meter reading and then it will continue to count based on my 'total consumed entity' in HA. 

  • 4 weeks later...

@kellerza noob question. Sorry in advance.

1. How can I change the input text code below to input number?

input_text: prepaid_units: name: Enter Prepaid units from meter pattern: '\d+(\.\d+)?' mode: password icon: mdi:home-lightning-bolt-outline min: 1 max: 10

2. How can I automatically enter the total based on what it is at 00H00?

Many thanks in advance.

On 2024/08/03 at 12:10 AM, rgt.dnl said:

@kellerza noob question. Sorry in advance.

1. How can I change the input text code below to input number?

input_text: prepaid_units: name: Enter Prepaid units from meter pattern: '\d+(\.\d+)?' mode: password icon: mdi:home-lightning-bolt-outline min: 1 max: 10

2. How can I automatically enter the total based on what it is at 00H00?

Many thanks in advance.

1.  For HA, the Input text integration allows the variables password or text for the mode setting.  So within you prepaid YAML file, change mode: password to mode: text and you'll no longer see the asterisk's.  You will however see some funky math happen.  So it's probably not 100% what you're looking for. But that's how this calculates the units remaining

2. Not sure what's trying to be achieved here.  This is a rolling total i.e. it counts down units remaining as your house uses power.  Why would you want to input a value at a specific time of day ?

Edited by hilt_ctn

On 2024/08/07 at 9:35 AM, hilt_ctn said:

1.  For HA, the Input text integration allows the variables password or text for the mode setting.  So within you prepaid YAML file, change mode: password to mode: text and you'll no longer see the asterisk's.  You will however see some funky math happen.  So it's probably not 100% what you're looking for. But that's how this calculates the units remaining

2. Not sure what's trying to be achieved here.  This is a rolling total i.e. it counts down units remaining as your house uses power.  Why would you want to input a value at a specific time of day ?

@hilt_ctn thanks so much for your response. On point 2, I have a rolling total that resets at midnight. When it goes back to zero it effectively adds back the units used to the total. I created the daily usage sensor via the utility meter helper. I am at a loss of how to get the rolling total to work such that I don't need to manually update the total units left every day. Thanks again for your help.

  • 1 year later...

Hi Everyone

I have just uploaded a new video using persistent entities and packages in Home Assistant, it works a lot better and doesn't loose it's settings between reboots.

It also creates a pretty good Prepaid Meter Dashboard that you can use as well.

Let me know what you guys think please, appreciate the comments.

image.png

Edited by Sc00bs

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.