Skip to content

Commit

Permalink
Merge pull request #26 from kwridan/fix/electricity-only-without-gas
Browse files Browse the repository at this point in the history
  • Loading branch information
megakid authored Apr 16, 2023
2 parents e6a5f4f + b4f8a1c commit eccb06e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/hildebrand_glow_ihd_mqtt/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@
"unit_of_measurement": "GBP",
"state_class": SensorStateClass.TOTAL_INCREASING,
"icon": "mdi:cash",
"func": lambda js : round(js['gasmeter']['energy']['import']['price']['standingcharge'] + \
(js['gasmeter']['energy']['import']['day'] * js['gasmeter']['energy']['import']['price']['unitrate']), 2),
"func": lambda js : round((js['gasmeter']['energy']['import']['price']['standingcharge'] or 0)+ \
((js['gasmeter']['energy']['import']['day'] or 0) * (js['gasmeter']['energy']['import']['price']['unitrate'] or 0)), 2),
}
]

Expand Down

0 comments on commit eccb06e

Please sign in to comment.