June 7, 20242 yr 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 June 7, 20242 yr by Sc00bs
June 8, 20242 yr 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. (Yes, something wrong with IAMMETER reading. Not sure why.) Edited June 8, 20242 yr by rgt.dnl
July 7, 20241 yr 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.
August 2, 20241 yr @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.
August 7, 20241 yr 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 August 7, 20241 yr by hilt_ctn
August 10, 20241 yr 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.
August 12, 2025Aug 12 Hi EveryoneI 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. Edited August 14, 2025Aug 14 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.