zigbee2mqtt-frontend
zigbee2mqtt-frontend copied to clipboard
[Bug]: Incorrect availability check condition
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
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.