Skip to content

victron_ble: Sensor state value 'no_input_power|engine_shutdown' not in allowed options #161717

@hhgerhard-google

Description

@hhgerhard-google

The problem

After restarting Home Assistant, the Victron BLE integration fails to initialize a sensor correctly. The integration tries to set a sensor value ( 'no_input_power|engine_shutdown' ) that is not in the list of expected options.

Steps to Reproduce:

  • Start or restart Home Assistant.
  • Ensure the victron_ble integration is active.
  • The error occurs for the sensor Victron Orion TS Smart DC-DC charger (sensor.orion_smart_hq2228pvtdn_aus_ursache).

Expected behaviour:

  • The sensor should accept the state correctly, even if the value no_input_power|engine_shutdown is reported by the device, without raising an error.

Actual behavior:

  • Home Assistant log shows:
    ValueError: Sensor sensor.orion_smart_hq2228pvtdn_aus_ursache provides state value 'no_input_power|engine_shutdown', which is not in the list of options provided

Log Snippet:

  • Logger: homeassistant.components.sensor
  • Source: helpers/entity_platform.py:684
  • Error adding entity sensor.orion_smart_hq2228pvtdn_aus_ursache for domain sensor with platform victron_ble
    ...
    ValueError: Sensor sensor.orion_smart_hq2228pvtdn_aus_ursache provides state value 'no_input_power|engine_shutdown', which is not in the list of options provided

What version of Home Assistant Core has the issue?

core-2026.1.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

victron_ble

Link to integration documentation on our website

https://www.home-assistant.io/integrations/victron_ble

Diagnostics information

Logger: homeassistant.components.bluetooth.manager
Quelle: components/bluetooth/manager.py:238
Integration: Bluetooth (Dokumentation, Probleme)
Erstmals aufgetreten: 21:20:43 (1 Vorkommnis)
Zuletzt protokolliert: 21:20:43

Error in bluetooth callback
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/bluetooth/manager.py", line 238, in async_register_callback
callback(service_info, BluetoothChange.ADVERTISEMENT)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 383, in _async_handle_bluetooth_event
self._process_update(update, was_available)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 409, in _process_update
processor.async_handle_update(update, was_available)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 624, in async_handle_update
self.async_update_listeners(new_data, was_available, changed_entity_keys)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 594, in async_update_listeners
update_callback(data)
~~~~~~~~~~~~~~~^^^^^^
File "/usr/src/homeassistant/homeassistant/components/bluetooth/passive_update_processor.py", line 693, in _handle_processor_update
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1024, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1149, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1086, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1030, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 663, in state
raise ValueError(
...<2 lines>...
)
ValueError: Sensor sensor.orion_smart_hq2228pvtdn_aus_ursache provides state value 'no_input_power|engine_shutdown', which is not in the list of options provided

Logger: homeassistant.components.sensor
Quelle: helpers/entity_platform.py:684
Integration: Sensor (Dokumentation, Probleme)
Erstmals aufgetreten: 21:20:43 (1 Vorkommnis)
Zuletzt protokolliert: 21:20:43

Error adding entity sensor.orion_smart_hq2228pvtdn_aus_ursache for domain sensor with platform victron_ble
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 684, in _async_add_entities
await self._async_add_entity(
entity, False, entity_registry, config_subentry_id
)
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1010, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1380, in add_to_platform_finish
self.async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1024, in async_write_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1149, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1086, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1030, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 663, in state
raise ValueError(
...<2 lines>...
)
ValueError: Sensor sensor.orion_smart_hq2228pvtdn_aus_ursache provides state value 'no_input_power|engine_shutdown', which is not in the list of options provided

Example YAML snippet

From ESP32 S3 ESPhome file, which is working as a bluetooth proxy:


substitutions:
  name: esp32-bluetooth-proxy-a38318
  friendly_name: Bluetooth Proxy a38318

packages:
  esphome.bluetooth-proxy: github://esphome/bluetooth-proxies/esp32-generic/esp32-generic-s3.yaml@main

esphome:
  name: ${name}
  name_add_mac_suffix: false
  friendly_name: ${friendly_name}

Anything in the logs that might be useful for us?

Additional information

The issue only occurs with certain status values (no_input_power|engine_shutdown).
All other sensors from the Victron BLE integration work correctly.
The problem occurs even when the Bluetooth Proxy (ESP32) is stable.
Likely a mapping/validation issue of sensor values within the integration.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions