[X] I have installed/try to install the latest version
The problem
Hi Andrea, thanks in advanced for you job, i was using your integration since a lot but with recently update it stopped to work, the message i get from the integration is in the screen shoot below, and if i try to remove or reload it doesn't do anything. I've tried to remove and re-install the integration but nothing happen. Down below the error i have in the log, should i do anything to get it work again?
Thanks
Registratore: homeassistant.config_entries
Fonte: config_entries.py:594
Prima occorrenza: 10:16:39 (1 occorrenze)
Ultima registrazione: 10:16:39
Error setting up entry Bticino X8000 for bticino_x8000
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/bticino_x8000/init.py", line 65, in async_setup_entry
subscription_id = await add_c2c_subscription(plant_id, webhook_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/bticino_x8000/init.py", line 36, in add_c2c_subscription
response = await bticino_api.set_subscribe_c2c_notifications(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/bticino_x8000/api.py", line 328, in set_subscribe_c2c_notifications
return {"status_code": status_code, "text": json.loads(content)}
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Registratore: homeassistant.core
Fonte: core.py:1554
Prima occorrenza: 10:16:39 (6 occorrenze)
Ultima registrazione: 10:16:39
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a823d80> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a823d80>>>
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a85c7c0> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a85c7c0>>>
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a85ca40> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a85ca40>>>
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a85d440> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a85d440>>>
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a821c60> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a821c60>>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 658, in state
numerical_value = int(value)
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'HEATING'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 661, in state
numerical_value = float(value)
^^^^^^^^^^^^
ValueError: could not convert string to float: 'HEATING'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/core.py", line 1554, in async_fire_internal
self._hass.async_run_hass_job(job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job
hassjob.target(args)
File "/usr/src/homeassistant/homeassistant/core.py", line 1418, in call
self.hass.async_run_hass_job(self.listener_job, event)
File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job
hassjob.target(args)
File "/usr/src/homeassistant/homeassistant/helpers/start.py", line 44, in _matched_event
hass.async_run_hass_job(at_start_job, hass)
File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job
hassjob.target(args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 486, in _async_template_startup
result_info.async_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1071, in async_refresh
self._refresh(None)
File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1257, in _refresh
self.hass.async_run_hass_job(self._job, event, updates)
File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job
hassjob.target(args)
File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 435, in _handle_results
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1000, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1126, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1061, in async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1006, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 665, in state
raise ValueError(
ValueError: Sensor sensor.termostato_soggiorno_custom_function has device class 'power', state class 'None' unit 'None' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'HEATING' (<class 'str'>)
On which thermostat you have the issue?
x8000
Which version of the Bticino X8000 component are you using?
It's a Legrand problem that happens sometimes (too much in my opinion). Anyway you have to try c2c API in legrand site, c2c and when API works, refresh the HA integration.
Checks
The problem
Hi Andrea, thanks in advanced for you job, i was using your integration since a lot but with recently update it stopped to work, the message i get from the integration is in the screen shoot below, and if i try to remove or reload it doesn't do anything. I've tried to remove and re-install the integration but nothing happen. Down below the error i have in the log, should i do anything to get it work again? Thanks
Registratore: homeassistant.config_entries Fonte: config_entries.py:594 Prima occorrenza: 10:16:39 (1 occorrenze) Ultima registrazione: 10:16:39
Error setting up entry Bticino X8000 for bticino_x8000 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bticino_x8000/init.py", line 65, in async_setup_entry subscription_id = await add_c2c_subscription(plant_id, webhook_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bticino_x8000/init.py", line 36, in add_c2c_subscription response = await bticino_api.set_subscribe_c2c_notifications( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/bticino_x8000/api.py", line 328, in set_subscribe_c2c_notifications return {"status_code": status_code, "text": json.loads(content)} ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/init.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Registratore: homeassistant.core Fonte: core.py:1554 Prima occorrenza: 10:16:39 (6 occorrenze) Ultima registrazione: 10:16:39
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a823d80> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a823d80>>>
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a85c7c0> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a85c7c0>>>
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a85ca40> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a85ca40>>>
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a85d440> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a85d440>>>
Error running job: <Job onetime listen homeassistant_start <function _async_at_core_state.._matched_event at 0x7f280a821c60> HassJobType.Callback <_OneTimeListener homeassistant.helpers.start:<function _async_at_core_state.._matched_event at 0x7f280a821c60>>>
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 658, in state
numerical_value = int(value)
^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'HEATING'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 661, in state numerical_value = float(value) ^^^^^^^^^^^^ ValueError: could not convert string to float: 'HEATING'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/core.py", line 1554, in async_fire_internal self._hass.async_run_hass_job(job, event) File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job hassjob.target(args) File "/usr/src/homeassistant/homeassistant/core.py", line 1418, in call self.hass.async_run_hass_job(self.listener_job, event) File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job hassjob.target(args) File "/usr/src/homeassistant/homeassistant/helpers/start.py", line 44, in _matched_event hass.async_run_hass_job(at_start_job, hass) File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job hassjob.target(args) File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 486, in _async_template_startup result_info.async_refresh() File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1071, in async_refresh self._refresh(None) File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1257, in _refresh self.hass.async_run_hass_job(self._job, event, updates) File "/usr/src/homeassistant/homeassistant/core.py", line 936, in async_run_hass_job hassjob.target(args) File "/usr/src/homeassistant/homeassistant/components/template/template_entity.py", line 435, in _handle_results self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1000, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1126, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1061, in async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1006, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 665, in state raise ValueError( ValueError: Sensor sensor.termostato_soggiorno_custom_function has device class 'power', state class 'None' unit 'None' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'HEATING' (<class 'str'>)
On which thermostat you have the issue?
x8000
Which version of the Bticino X8000 component are you using?
0.2.0
Which version of Home Assistant are you using?
2024.6.0b1
What type of installation are you running?
Home Assistant OS
Anything in the logs that might be useful for me?
No response
Additional information
No response