CurrentCost Component for Home Assistant

I too get random spikes (well drop outs for me actually) but mine are from an optical sensor (Current Cost OptiSmart) not a current clamp I tried all sorts to eliminate it but never resolved the problem so I’m now using the “Filter” template to make things look a bit neater


ANY suggestions on how to actually FIX this issue would be greatly appreciated

ebay is your only hope for Current Cost sensors in my opinion or possibly friends and family if your in the UK as their equipment was often given away free by energy providers such as EON & British Gas and most people in my opinion never used them and chucked them in a cupboard or loft.
I’ve had a full set of Current Cost equipment for many years which I mostly bought direct from Current Cost but even though their website is still up and running I believe the company isn’t.
Available sensors are / were
Battery powered transmitters (3 variants I think!)
Current Clamp - Large
Current Clamp - Small
IAM (Individual Appliance Monitor)
OptiSmart (Pulse Counter for Electricity Meter)
GaSmart Type G (Gas Meter)
GaSmart Type V (Gas Meter)
GaSmart Type J (Gas Meter)
NetSmart

I am using Home Assistant 2022.11.3 on RPi 4 and have installed Current Cost manually using custom_components. I have purchased the USB RJ45 cable and inserted the code in config.yaml, but my sensors are showing ‘unknown’ or ‘unavailable’. I have one other USB connected to the RPi4 for Russound system. When I try dmesg | grep tty in Terminal, I get a large amount of data, but within the data is a line ‘usb 1-1.1: cp210x converter now attached to ttyUSB1’.
Do I need to modify the config.yaml code to make this work ?

It would help if you could share your config.
Also can you set the CurrentCost logging level to debug and send me what you get in your logs?

logger:
  default: error
  logs:
    custom_components.currentcost: debug

(don’t forget to disable this after your test or you’ll flood your logs and disk space)

Thank you.
Here is my log file.
Can you confirm that you would like me to also add my config.yaml?

2022-11-22 22:00:08.715 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration eventsensor which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-11-22 22:00:08.718 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration braviatv_psk which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-11-22 22:00:08.719 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-11-22 22:00:08.721 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration bmw_connected_drive which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-11-22 22:00:08.722 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration currentcost which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-11-22 22:00:43.387 DEBUG (MainThread) [custom_components.currentcost.sensor] devices: [0, 2, 9]
2022-11-22 22:00:43.770 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [data] is an invalid option for [automation]. Check: automation->data. (See /config/configuration.yaml, line 4).
2022-11-22 22:00:51.541 ERROR (MainThread) [homeassistant.components.upnp] The 'upnp' option near /config/configuration.yaml:0 has been removed, please remove it from your configuration
2022-11-22 22:00:55.314 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry Soma Connect for soma
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
raise err
File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
sock.connect(sa)
OSError: [Errno 113] Host is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 239, in request
super(HTTPConnection, self).request(method, url, body=body, headers=headers)
File "/usr/local/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/local/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 205, in connect
conn = self._new_conn()
File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xa5263e80>: Failed to establish a new connection: [Errno 113] Host is unreachable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.191', port=3000): Max retries exceeded with url: /list_devices (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa5263e80>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 365, in async_setup
result = await component.async_setup_entry(hass, self)
File "/usr/src/homeassistant/homeassistant/components/soma/__init__.py", line 58, in async_setup_entry
devices = await hass.async_add_executor_job(hass.data[DOMAIN][API].list_devices)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/api/soma_api.py", line 11, in list_devices
return requests.get(url = "http://"+self.soma_connect_ip+":"+str(self.soma_connect_port)+"/list_devices", timeout = self.timeout).json()
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.191', port=3000): Max retries exceeded with url: /list_devices (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xa5263e80>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2022-11-22 22:01:13.622 ERROR (MainThread) [homeassistant.helpers.event] Error while processing template: Template("{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}")
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1701, in forgiving_float_filter
return float(value)
TypeError: float() argument must be a string or a real number, not 'NoneType'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 420, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1933, in _render_with_context
return template.render(**kwargs)
File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 1, in top-level template code
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1704, in forgiving_float_filter
raise_no_default("float", value)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1402, in raise_no_default
raise ValueError(
ValueError: Template error: float got invalid input 'None' when rendering template '{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}' but no default was specified
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 536, in async_render_to_info
render_info._result = self.async_render(variables, strict=strict, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 422, in async_render
raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'None' when rendering template '{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}' but no default was specified

I can’t see anything in the logs from the custom component, are you sure you’ve installed It correctly?
And yes please do share the part of your config relating to the current cost custom component

Sorry, I have been away for a while.
I have reinstalled Current via HACS. I have tried ttyusb0 and ttyusb1 as I have another USB connection for audio control, but neither seem to work.
Here is a copy of my config file.

sensor: 
 
    
  - platform: currentcost
    serial_port: /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if01-port0
    name: Current Cost
    baudrate: 57600
    devices:
      - 0
      - 2
      - 9
  # Add this sensor if you want to see data in the energy tab
  - platform: integration
    source: sensor.current_cost
    name: Total Energy
    unit_prefix: k
    round: 2

template:
  - sensor:
      - name: "CurrentCost Temperature"
        unit_of_measurement: '°C' # or °F for Fahrenheits
        state: '{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}' # Manual adjustment of -3°C in case the temp sensor is higher than real temperature
        device_class: temperature
        state_class: measurement # Add state_class: measurement for long term statistics are required
  - sensor:
      - name: "CurrentCost Power"
        unit_of_measurement: 'W'
        state: '{{ state_attr("sensor.current_cost", "Appliance 0") }}'
        device_class: power
        state_class: measurement
  - sensor:
      - name: "Dehumidifier Power"
        unit_of_measurement: 'W'
        state: '{{ state_attr("sensor.current_cost", "Appliance 2") }}'
        device_class: power
        state_class: measurement
  - sensor:
      - name: "Total Energy Used Last 24h" # Note: this data is published by the Current Cost device every 2h
        unit_of_measurement: 'KWh'
        state: '{{ state_attr("sensor.current_cost", "Appliance 0 Last 24h") }}'
        device_class: energy    

Here is a copy from my log

Logger: homeassistant.helpers.template_entity
Source: helpers/template_entity.py:356 
First occurred: 2:58:05 PM (1 occurrences) 
Last logged: 2:58:05 PM

TemplateError('ValueError: Template error: float got invalid input 'None' when rendering template '{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}' but no default was specified') while processing template 'Template("{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}")' for attribute '_attr_native_value' in entity 'sensor.currentcost_temperature'

And



Logger: homeassistant.helpers.event
Source: helpers/template.py:422 
First occurred: 2:58:05 PM (1 occurrences) 
Last logged: 2:58:05 PM

Error while processing template: Template("{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}")
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1701, in forgiving_float_filter
    return float(value)
TypeError: float() argument must be a string or a real number, not 'NoneType'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 420, in async_render
    render_result = _render_with_context(self.template, compiled, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1933, in _render_with_context
    return template.render(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 1, in top-level template code
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1704, in forgiving_float_filter
    raise_no_default("float", value)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1402, in raise_no_default
    raise ValueError(
ValueError: Template error: float got invalid input 'None' when rendering template '{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}' but no default was specified

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 536, in async_render_to_info
    render_info._result = self.async_render(variables, strict=strict, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 422, in async_render
    raise TemplateError(err) from err
homeassistant.exceptions.TemplateError: ValueError: Template error: float got invalid input 'None' when rendering template '{{ state_attr("sensor.current_cost", "Temperature") | float -3 }}' but no default was specified
type or paste code here

Any help would be very appreciated. Thank you.

Sorry just realised I still had this one as draft and not actually replied to

It looks as though your currentcost is not correctly set up as nothing is being displayed in the logs.
What setup do you have? Docker? Raspberry Pi? If container based (docker/

As a side note you could improve your templated sensors by replacing float with float(0) so that at least it doesn’t throw errors in your logs when no data is present.

I am really loving this home assistant (my first week), and now the old current cost is back in action after my energomonitor died last year, plus I am able to once again update my power stats to pvoutput - this envir current cost thing just keeps on giving. I can see this sucking up weeks of my time if I am not careful!.

I have a quick question - I am not getting info back for the 24 hour and 30 days stats from CC - I am sure it was there yesterday… I have tried a restart of the rasberryPi, re-connecting the USB, and powering off/on the envir. Any ideas ?

image

I have added all these sensors ready for it -

  - name: "Power Used Last 24h - CC" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 0 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Power Used Last 30 days - CC" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 0 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Solar Generation Last 24h - CC" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 1 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Solar Generation Last 30 days - CC" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 1 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Air Con Power Last 24h" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 2 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Air Con Power Last 30 days" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 2 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "UPS Plug Power Last 24h" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 3 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "UPS Plug Power Last 30 days" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 3 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy
    
  - name: "Garage Non UPS Power Last 24h" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 4 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Garage Non UPS Last 30 days" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 4 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy
    
  - name: "Fridge Power Last 24h" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 5 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Fridge Power Last 30 days" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 5 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "MediaPC Last 24h" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 6 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "MediaPC Last 30 days" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 6 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy     
    
  - name: "Washing Machine Power Last 24h" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 7 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Washing Machine Power Last 30 days" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 7 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Dryer Last 24h" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 8 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Dryer Last 30 days" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 8 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Dishwasher Power Last 24h" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 9 Last 24h") * 0.9533 | round(0)}}'
    device_class: energy

  - name: "Dishwasher Power Last 30 days" 
    unit_of_measurement: 'KWh'
    state: '{{ state_attr("sensor.current_cost", "Appliance 9 Last 30 days") * 0.9533 | round(0)}}'
    device_class: energy

Ignore this - started working on its own, was loads later than 2 hours though. Onward and upward!

I just updated to the latest home assistant release 2023.6.0 - and after its reboot, the current cost stuff all stopped working. loads of errors in the log. None of the CC sensors available.

I worked back through all the appliance errors (I have 9 applainces and 2 channels plus the temp all in use) and I believe this was the start of it all as shown in the log below.

I restored from last backup and all is well again. My first ever upgrade of HA - and now put off doing it again!

2023-06-08 15:10:19.884 ERROR (MainThread) [homeassistant.loader] Unexpected exception importing platform custom_components.currentcost.sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/loader.py”, line 833, in get_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 850, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1206, in _gcd_import
File “”, line 1178, in _find_and_load
File “”, line 1149, in _find_and_load_unlocked
File “”, line 690, in _load_unlocked
File “”, line 940, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/config/custom_components/currentcost/sensor.py”, line 7, in
import serial_asyncio
File “/usr/local/lib/python3.11/site-packages/serial_asyncio/init.py”, line 408, in
@asyncio.coroutine
^^^^^^^^^^^^^^^^^
AttributeError: module ‘asyncio’ has no attribute ‘coroutine’
2023-06-08 15:10:19.914 ERROR (MainThread) [homeassistant.config] Platform error: sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/loader.py”, line 833, in get_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 850, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1206, in _gcd_import
File “”, line 1178, in _find_and_load
File “”, line 1149, in _find_and_load_unlocked
File “”, line 690, in _load_unlocked
File “”, line 940, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/config/custom_components/currentcost/sensor.py”, line 7, in
import serial_asyncio
File “/usr/local/lib/python3.11/site-packages/serial_asyncio/init.py”, line 408, in
@asyncio.coroutine
^^^^^^^^^^^^^^^^^
AttributeError: module ‘asyncio’ has no attribute ‘coroutine’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config.py”, line 928, in async_process_component_config
platform = p_integration.get_platform(domain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/loader.py”, line 842, in get_platform
raise ImportError(

I’ve run into the same problem with Current Cost not working after the latest Home Assistant update.
Unfortunately I’m unable to go back as every time a try a restore from a previous backup it fails.
Can anyone offer any assistance please, I use a lot of Current Cost equipment so I now have a lot of data missing

It took ages to restore my 150mb backup - like over an hour.
I restarted the pi once and it was still the latest, then restored again and left it. Dunno if that helps.

I am new to HA, and I am not exactly sure where I am suppost to post that this CC integration no longer works.

1 Like

@lolouk44 are you able to help? I’ve not yet updated but comments above seem to suggest not the best thing to do right now?

I managed to get my system back up and running after reading vwkombi’s post and giving it another go, I was more patient this time and after approx 2 hours I was back up and running on “Home Assistant core 2023.5.4”

I do have another odd issue though

My Gas Meter has been reporting a reading to “3” decimal places for the last few years mimicking my actual OLD analogue gas meter but I’ve just noticed that no mater what I do with my .yaml file configuration it will only report to “2” decimal places at most, any suggestion greatly appreciated

        state: '{{ (state_attr("sensor.current_cost", "Impulses 9")| float /100 +15711.330 | float) | round (3) }}'
        availability: "{{ states('sensor.current_cost', 'Impulses 9')|is_number }}"
        availability: "{{ states('sensor.current_cost', 'Impulses 9') != 'unavailable' }}"
        unique_id: currentcost_gas_meter
        # NO UNITS OF MEASUREMENT #
        # USED FOR "GAS METER" #

Sorry I don’t use gas meter sensor myself…

Just incase anyone missed the update on github (ill try this over the weekend)

marc252 commented last week

Looks like modifying requirements in custom_components/currentcost/manifest.json from:
“pyserial-asyncio==0.4”,
to
“pyserial-asyncio==0.6”,

Solves the issue

3 Likes

Seems to have worked for me… HA required a reboot after upgrade anyways, updated as above, rebooted and got my CC data back again.

1 Like

Is anyone still using this integration? I’m new to HA and I followed the instructions using hacs. All the entities were built, but no data in them. I’m not sure how to troubleshoot. I have the US version of ENVR with two probes.

the change from post 155 and a full reboot worked for me. thx

1 Like

Will this be updated before Jan?

Logger: homeassistant.const
Source: helpers/deprecation.py:197
First occurred: 7:02:45 PM (1 occurrences)
Last logged: 7:02:45 PM

POWER_WATT was used from currentcost, this is a deprecated constant which will be removed in HA Core 2025.1. Use UnitOfPower.WATT instead, please report it to the author of the ‘currentcost’ custom integration