Skip to content

Fixed fcrd_today_net_revenue#45

Merged
jenshorn merged 1 commit into
faanskit:masterfrom
twinor:patch-1
Aug 18, 2025
Merged

Fixed fcrd_today_net_revenue#45
jenshorn merged 1 commit into
faanskit:masterfrom
twinor:patch-1

Conversation

@twinor

@twinor twinor commented Aug 12, 2025

Copy link
Copy Markdown
Contributor

Noticed that pycheckwatt had issues as per below in ha-checkwatt:
ERROR (MainThread) [custom_components.checkwatt] Unexpected error fetching checkwatt data
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 380, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/checkwatt/init.py", line 401, in _async_update_data
self.fcrd_today_net_revenue = cw_inst.fcrd_today_net_revenue
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pycheckwatt/init.py", line 1076, in fcrd_today_net_revenue
if "NetRevenue" in self.revenue[0]:
~~~~~~~~~~~~^^^
This fix works in the example.py at least but I suck at debugging in HA so will hope someone else can pick up from here.

@jenshorn jenshorn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jenshorn jenshorn merged commit ea5e815 into faanskit:master Aug 18, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants