Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 99036

Monthly Utility Meter Tariff Calculation Not Computing

$
0
0

@DayRunner131 wrote:

Would someone please look over my customizations.yaml code and shed light as to why my Monthly Energy Cost is stuck at the ‘Customer Service Charge’ value set as an input_number.

The state ‘sensor.monthly_kwh’ has added at least 1kWh and state ‘sensor.monthly_energy_cost’ has stayed stuck at the $9.65 ‘input_number:customer_svc_charge’. I would have expected the state ‘sensor.monthly_energy_cost’ to have increased by $0.201 per 1kWh added.

sensor:
  - platform: template
      monthly_kwh_cost:
        friendly_name: "Monthly Energy Cost"
        unit_of_measurement: "$"
        value_template: "{{ ((((states('sensor.monthly_kwh')|float) * ((states('input_number.generation_rate') + states('input_number.transmission_rate'))|float)) ) + (states('input_number.customer_svc_charge')|float) )|round(2) }}"
    
# Utility Meter Configurations        
        
utility_meter:
    monthly_kwh:
      source: sensor.mains_total_kwh
      cycle: monthly
      offset:
        days: 11
    
# User Inputs

input_number:
  generation_rate:
    name: Generation Rate
    min: 0.001
    max: 0.300
    step: 0.001
    unit_of_measurement: "$/kWh"
    mode: box
    icon: mdi:currency-usd
  transmission_rate:
    name: Transmission Rate
    min: 0.001
    max: 0.300
    step: 0.001
    unit_of_measurement: "$/kWh"
    mode: box
    icon: mdi:currency-usd
  customer_svc_charge:
    name: Customer Service Charge
    min: 0.100
    max: 40.000
    step: 0.001
    unit_of_measurement: "$/cycle"
    mode: box
    icon: mdi:currency-usd


Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 99036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>