zigbee2mqtt-frontend icon indicating copy to clipboard operation
zigbee2mqtt-frontend copied to clipboard

[Bug]: Incorrect availability check condition

Open mrwogu opened this issue 8 months ago • 1 comments

What happened?

The availability status of devices is not displayed correctly when global availability is disabled, but availability is enabled for a specific device.

In the current implementation of Availability.tsx, the condition determining availability is:

...
    if (disabled) {
        return <span>{t('disabled')}</span>;
    } else if (availabilityFeatureEnabled && availabilityEnabledForDevice) {
...

https://github.com/nurikk/zigbee2mqtt-frontend/blob/dev/src/components/zigbee/Availability.tsx#L28

This causes availability to remain disabled unless both the global setting and the device-specific setting are enabled.

A similar issue occurs for the devices table. The availability column is only visible when the availabilityFeatureEnabled setting is globally enabled. https://github.com/nurikk/zigbee2mqtt-frontend/blob/dev/src/components/zigbee/DevicesTable.tsx#L55

This causes availability column to remain disabled unless the global setting is enabled.

What browsers are you seeing the problem on?

Chrome

Relevant stacktrace


Did you download state.json.zip?

I will not attach state.json.zip

mrwogu avatar Mar 06 '25 23:03 mrwogu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 06 '25 01:05 stale[bot]