Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Исправление отображения в DashBoard Zigbee2mqtt #140

Merged
merged 1 commit into from
Apr 6, 2024
Merged

Исправление отображения в DashBoard Zigbee2mqtt #140

merged 1 commit into from
Apr 6, 2024

Conversation

Dimonix
Copy link
Contributor

@Dimonix Dimonix commented Apr 5, 2024

Исправление отображения в DashBoard Zigbee2mqtt
issues #120

@devbis
Copy link
Owner

devbis commented Apr 5, 2024

Though it works, it is a hack. This syntax should be replaced by modern extend feature.
The bug is in zigbee2mqtt-frontend package and covers multiple devices: nurikk/zigbee2mqtt-frontend#1926

@Dimonix
Copy link
Contributor Author

Dimonix commented Apr 5, 2024

Другой вариант добавить access: 'STATE' к расширениям temperature и humidity :

extend: [
        ...
        temperature({reporting: {min: 10, max: 300, change: 10}, access: 'STATE'}),
        humidity({reporting: {min: 10, max: 300, change: 50}, access: 'STATE'}),
        ...
],

Теряем принудительное обновление (а она нам надо?)

в zigbee2mqtt-frontend за это отвечают строки:

if (access & FeatureAccessMode.ACCESS_STATE && isOnlyOneBitIsSet(access)) {
    return filteredOutFeature;
}

а расширения описаны как:

export function temperature(args?: Partial<NumericArgs>) {
    return numeric({
        name: 'temperature',
        cluster: 'msTemperatureMeasurement',
        attribute: 'measuredValue',
        reporting: {min: '10_SECONDS', max: '1_HOUR', change: 100},
        description: 'Measured temperature value',
        unit: '°C',
        scale: 100,
        access: 'STATE_GET',
        ...args,
    });
}

@devbis devbis merged commit 96edb6b into devbis:master Apr 6, 2024
@devbis
Copy link
Owner

devbis commented Apr 6, 2024

Sounds good, Thanks!

@Dimonix Dimonix deleted the feature branch April 10, 2024 20:55
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants