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

HA discovery configuration dropped when value is null #22976

Open
ghoz opened this issue Jun 8, 2024 · 0 comments
Open

HA discovery configuration dropped when value is null #22976

ghoz opened this issue Jun 8, 2024 · 0 comments
Labels
problem Something isn't working

Comments

@ghoz
Copy link
Contributor

ghoz commented Jun 8, 2024

What happened?

I have customized some home assistant discovery for specific entities to override the default category from diagnostic to regular sensor.
In order to do that I'm overriding the specific entity_category for the entities in my devices.yaml file, and it works:

'0xieeeAddr':
  friendly_name: Smart_plug
  description: chatty Nous A1Z
  [...]
  homeassistant:
    power:
      entity_category: null
    current:
      entity_category: null
    voltage:
      entity_category: null

However, when making any change using the UI, all entity_category: null are removed.

'0xieeeAddr':
  friendly_name: Smart_plug
  description: chatty Nous A1Z
  [...]
  homeassistant:
    power: {}
    current: {}
    voltage: {}

This might be tied to #22674
I haven't tested if it also occurs in the main configuration file under homeassistant key

note: It is kind of hidden as z2m no longer sends the discovery payload if already sent since #22701 , so home assistant won't see the change unless the retained discovery topics are cleared first (#22977).

What did you expect to happen?

I expected that my configuration would keep my settings.

How to reproduce it (minimal and precise)

  1. add a custom home assistant entry in a device configuration with a value of null
  2. change a setting in the UI
  3. see that the config was changed and the entry removed

Zigbee2MQTT version

1.38.0

Adapter firmware version

20230507

Adapter

Sonoff ZBDongle-P

Setup

container on pi3

Debug log

No response

@ghoz ghoz added the problem Something isn't working label Jun 8, 2024
@ghoz ghoz changed the title HA discovery configuration dropped wen value is null HA discovery configuration dropped when value is null Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
problem Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant