Repository: home-assistant/core
File: homeassistant/components/matter/binary_sensor.py (Python)

Code before:
        ),
        entity_class=MatterBinarySensor,
        required_attributes=(
            clusters.ValveConfigurationAndControl.Attributes.ValveFault,
        ),
    ),
    MatterDiscoverySchema(
        platform=Platform.BINARY_SENSOR,
        entity_description=MatterBinarySensorEntityDescription(
            key="RefrigeratorAlarmDoorOpen",
            translation_key="alarm_door",
            device_class=BinarySensorDeviceClass.PROBLEM,
            entity_category=EntityCategory.DIAGNOSTIC,
            device_to_ha=lambda x: bool(
                x & clusters.RefrigeratorAlarm.Bitmaps.AlarmBitmap.kDoorOpen
            ),
        ),
        entity_class=MatterBinarySensor,
        required_attributes=(clusters.RefrigeratorAlarm.Attributes.State,),
        allow_multi=True,
    ),
    MatterDiscoverySchema(
        platform=Platform.BINARY_SENSOR,
        entity_description=MatterBinarySensorEntityDescription(
            key="WindowCoveringConfigStatusOperational",
            device_class=BinarySensorDeviceClass.PROBLEM,
            entity_category=EntityCategory.DIAGNOSTIC,
            # unset Operational bit from ConfigStatus bitmap means problem
            device_to_ha=lambda x: not bool(
                x & clusters.WindowCovering.Bitmaps.ConfigStatus.kOperational
            ),
        ),
        entity_class=MatterBinarySensor,
        required_attributes=(clusters.WindowCovering.Attributes.ConfigStatus,),
    ),
    MatterDiscoverySchema(
        platform=Platform.BINARY_SENSOR,
        entity_description=MatterBinarySensorEntityDescription(
            key="ThermostatRemoteSensing_LocalTemperature",
            translation_key="thermostat_remote_sensing_local_temperature",
            entity_category=EntityCategory.DIAGNOSTIC,
            # LocalTemperature bit from RemoteSensing attribute
            device_to_ha=lambda x: bool(
                x
                & clusters.Thermostat.Bitmaps.RemoteSensingBitmap.kLocalTemperature  # Calculated Local Temperature is derived from a remote node
            ),
        ),
        entity_class=MatterBinarySensor,
        required_attributes=(clusters.Thermostat.Attributes.RemoteSensing,),
        allow_multi=True,
    ),

Review comment (suggestion):
I think `config_status_operational` is fine, but we could probably also use just `configuration_status` or `config_status` as the translation key here.

Code after:
        ),
        entity_class=MatterBinarySensor,
        required_attributes=(
            clusters.ValveConfigurationAndControl.Attributes.ValveFault,
        ),
    ),
    MatterDiscoverySchema(
        platform=Platform.BINARY_SENSOR,
        entity_description=MatterBinarySensorEntityDescription(
            key="RefrigeratorAlarmDoorOpen",
            translation_key="alarm_door",
            device_class=BinarySensorDeviceClass.PROBLEM,
            entity_category=EntityCategory.DIAGNOSTIC,
            device_to_ha=lambda x: bool(
                x & clusters.RefrigeratorAlarm.Bitmaps.AlarmBitmap.kDoorOpen
            ),
        ),
        entity_class=MatterBinarySensor,
        required_attributes=(clusters.RefrigeratorAlarm.Attributes.State,),
        allow_multi=True,
    ),
    MatterDiscoverySchema(
        platform=Platform.BINARY_SENSOR,
        entity_description=MatterBinarySensorEntityDescription(
            key="WindowCoveringConfigStatusOperational",
            translation_key="config_status_operational",
            device_class=BinarySensorDeviceClass.PROBLEM,
            entity_category=EntityCategory.DIAGNOSTIC,
            # unset Operational bit from ConfigStatus bitmap means problem
            device_to_ha=lambda x: not bool(
                x & clusters.WindowCovering.Bitmaps.ConfigStatus.kOperational
            ),
        ),
        entity_class=MatterBinarySensor,
        required_attributes=(clusters.WindowCovering.Attributes.ConfigStatus,),
    ),
    MatterDiscoverySchema(
        platform=Platform.BINARY_SENSOR,
        entity_description=MatterBinarySensorEntityDescription(
            key="ThermostatRemoteSensing_LocalTemperature",
            translation_key="thermostat_remote_sensing_local_temperature",
            entity_category=EntityCategory.DIAGNOSTIC,
            # LocalTemperature bit from RemoteSensing attribute
            device_to_ha=lambda x: bool(
                x
                & clusters.Thermostat.Bitmaps.RemoteSensingBitmap.kLocalTemperature  # Calculated Local Temperature is derived from a remote node
            ),
        ),
        entity_class=MatterBinarySensor,
        required_attributes=(clusters.Thermostat.Attributes.RemoteSensing,),
        allow_multi=True,