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

MQTT dimmer values for min and max ignored #116444

Open
UsefulVid opened this issue Apr 30, 2024 · 12 comments
Open

MQTT dimmer values for min and max ignored #116444

UsefulVid opened this issue Apr 30, 2024 · 12 comments

Comments

@UsefulVid
Copy link

The problem

I use a zigbee dimmer which has max and min values for its brightness.
They are setup correctly and according to my zigbee2mqtt log they are published to mqtt and home assitant.
They seem to be ignored when it comes to dimming. If I use the percentage bar the values are quickly exceeded and have no effect.

What version of Home Assistant Core has the issue?

core-2024.4.4

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

mqtt & zigbee2mqtt

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

from the z2m log:
Info 2024-04-30 12:20:40MQTT publish: topic 'zigbee2mqtt/EsstischLicht', payload '{"brightness":54,"countdown":0,"light_type":"led","linkquality":184,"max_brightness":150,"min_brightness":15,"power_on_behavior":"off","state":"OFF","switch_type":"momentary"}'

from the HA log:
2024-04-29 17:08:18.172 DEBUG (MainThread) [homeassistant.components.mqtt.models] Rendering incoming payload '{"brightness":55,"countdown":0,"light_type":"led","linkquality":188,"max_brightness":150,"min_brightness":15,"power_on_behavior":"off","state":"OFF","switch_type":"momentary"}' with variables {'entity_id': 'select.esstischlicht_switch_type', 'name': 'Switch type', 'this': <template TemplateStateFromEntityId(select.esstischlicht_switch_type)>} and Template<template=({{ value_json.switch_type }}) renders=505>

Additional information

No response

@home-assistant
Copy link

Hey there @emontnemery, @jbouwh, @bdraco, mind taking a look at this issue as it has been labeled with an integration (mqtt) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of mqtt can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign mqtt Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


mqtt documentation
mqtt source
(message by IssueLinks)

@jbouwh
Copy link
Contributor

jbouwh commented Apr 30, 2024

The mqtt config published for your device somewhere at homeassistant/{platform}/{id}/config

@UsefulVid
Copy link
Author

UsefulVid commented Apr 30, 2024

The mqtt config published for your device somewhere at homeassistant/{platform}/{id}/config

Yes and there I cannot set the max and min values. What do you need from my site?
The diagnostics?
image

mqtt-ba7b82ae38f6ef2b052efcafa70961e9-EsstischLicht-e2edd474dba92941d58a23860e33fe9e.json

@jbouwh
Copy link
Contributor

jbouwh commented Apr 30, 2024

At the MQTT INFO link you can find the configs for the device. The JSON is what is received by MQTT.

@UsefulVid
Copy link
Author

UsefulVid commented May 2, 2024

At the MQTT INFO link you can find the configs for the device. The JSON is what is received by MQTT.

Can you please clarify what I should do? Yes I can find the information there. Do you want me to share it here?

Topic: homeassistant/light/0xf082c0fffe20d59b/light/config
availability:
  - topic: zigbee2mqtt/bridge/state
    value_template: '{{ value_json.state }}'
brightness: true
brightness_scale: 254
command_topic: zigbee2mqtt/EsstischLicht/set
device:
  identifiers:
    - zigbee2mqtt_0xf082c0fffe20d59b
  manufacturer: TuYa
  model: 1 gang smart dimmer module (TS0601_dimmer_5)
  name: EsstischLicht
  via_device: zigbee2mqtt_bridge_0xb43522fffe215743
name: null
object_id: esstischlicht
origin:
  name: Zigbee2MQTT
  sw_version: 1.36.1
  support_url: https://www.zigbee2mqtt.io
schema: json
state_topic: zigbee2mqtt/EsstischLicht
unique_id: 0xf082c0fffe20d59b_light_zigbee2mqtt
platform: mqtt

image

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@UsefulVid
Copy link
Author

Problem still persists with new updates

@jbouwh
Copy link
Contributor

jbouwh commented May 29, 2024

Based on the config published by Z2M:
If you control brightness it will be within the scale of 0 and 254.
When changed in HA the change command will be published at topic zigbee2mqtt/EsstischLicht/set. You can check it output with MQTT Explorer or and other MQTT client tool. That should work. If the light is not picking this op correctly, then this is mot likely an issue with Zigbee2Mqtt

@UsefulVid
Copy link
Author

I could only find this topic:
zigbee2mqtt/EsstischLicht
couldn't find "set"
image

@jbouwh
Copy link
Contributor

jbouwh commented May 29, 2024

It should appear if you change the lights brightness

@UsefulVid
Copy link
Author

UsefulVid commented May 29, 2024

It should appear if you change the lights brightness

What you see in the screenshot appeared after changing the max brigthness. Even after changing the brightness there is no "set".

image

@jbouwh
Copy link
Contributor

jbouwh commented May 29, 2024

Ah okay, will try to reproduce it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants