home-assistant/core

binary_sensor: missing charging/not charging

Ludy87 opened this issue · 1 comments

The problem

An attempt is made to use a custom component that has a binary sensor from the BinarySensorDeviceClass.BATTERY_CHARGING.

When creating an automation, the error Message malformed: value must be one of ['bat_low', 'co', 'cold', 'connected', 'gas', 'hot', 'light', ' locked', 'moist', 'motion', 'moving', 'no_co', 'no_gas', 'no_light', 'no_motion', 'no_problem', 'no_smoke', 'no_sound', 'no_vibration', 'not_bat_low' , 'not_cold', 'not_connected', 'not_hot', 'not_locked', 'not_moist', 'not_moving', 'not_occupied', 'not_opened', 'not_plugged_in', 'not_powered', 'not_present', 'not_running', ' not_tampered', 'not_unsafe', 'occupied', 'opened', 'plugged_in', 'powered', 'present', 'problem', 'running', 'smoke', 'sound', 'tampered', 'turned_off' , 'turned_on', 'unsafe', 'update', 'vibration'] for dictionary value @ data['type']
The option charging and not_charging is missing.

TURNED_ON = [
CONF_BAT_LOW,
CONF_CO,
CONF_COLD,

TURNED_OFF = [
CONF_NOT_BAT_LOW,
CONF_NOT_COLD,

The entries for the display name for condition_type (is_charging and is_not_charging) and for trigger_type (charging and not_charging) are still missing in the string.json.

I hope it is understandable.

What version of Home Assistant Core has the issue?

core-2023.6.0.dev0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

No response

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

I suspect that CONF_NO_UPDATE needs to be added in TURNED_OFF as well