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

Cumulative Gas Use is too high #18

Open
gardiner4 opened this issue Mar 30, 2023 · 4 comments
Open

Cumulative Gas Use is too high #18

gardiner4 opened this issue Mar 30, 2023 · 4 comments

Comments

@gardiner4
Copy link

My NaviLink shows Total Gas Usage as 230 therms, but Cumulative Gas Use in this integration reports 22,407.2 ft³. Yesterday the app says I used .3 therms, but the Cumulative Gas Use increased 183.6 ft³. I think a unit conversion is off. This is a NPE-240 in the US.

@nikshriv
Copy link
Owner

nikshriv commented Mar 31, 2023

I have been using the old conversion factor from the prior version, assuming that it wouldn't change. I'll take a closer look at it this weekend and update. Thanks

@wisem2540
Copy link

FYI this appears to be broken. Can you share your conversion so we can at least adjust the sensor?

@gardiner4
Copy link
Author

Here is the conversion from /navien_water_heater/sensor.py. My unit is offline right now, but if the unit is reporting cubic feet you might just have to divide by 35.3147.

"accumulatedGasUsage": GenericSensorDescription(
state_class = SensorStateClass.TOTAL_INCREASING,
native_unit_of_measurement=VOLUME_CUBIC_METERS if hass_units == "metric" else VOLUME_CUBIC_FEET,
name="Cumulative Gas Use",
conversion_factor = 1 if hass_units == navien_units else 35.3147 if hass_units == "us_customary" else 0.0283168732,
device_class=SensorDeviceClass.GAS

@gardiner4
Copy link
Author

So the Navien App has a lifetime count of therms. This integration reports in cubic feet. My natural gas provider National Grid calculates the bill using ccf which is a hundred cubic feet. I am now using a template to do the approximate conversion to ccf.

sensor:

  • platform: template
    sensors:
    gas_usage_ccf:
    friendly_name: "Gas Usage in CCF"
    unit_of_measurement: 'CCF'
    device_class: 'gas'
    value_template: "{{ (states('sensor.ch1_unit1_cumulative_gas_use') | float) / 100 }}"
    attribute_templates:
    state_class: "total"

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