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

Renaming thermostat in zigbee2mqtt, changing the homeassistant id causes exception #1479

Open
3 tasks
phdoerfler opened this issue Nov 17, 2024 · 1 comment
Open
3 tasks
Assignees
Labels
new bug incoming bug issue

Comments

@phdoerfler
Copy link

Prerequisites

  • Model name of your Devices:
  • Eurotronic
  • Spirit Zigbee wireless heater thermostat
  • Zigbee model SPZB0001
  • Firmware build date 20191014
  • Firmware version 22190930
  • Output from Home Assistant Developer Tools state (Output of the underlying real thermostat)
hvac_modes:
  - "off"
  - auto
  - heat
min_temp: 5
max_temp: 30
target_temp_step: 0.5
current_temperature: 21
temperature: 21
hvac_action: heating
friendly_name: trv_kueche
supported_features: 385

Description

In zigbee2mqtt rename device with the box "Update Home Assistant entity ID" checked, changing the entity ID from, e.g., "climate.trv_küche" to "climate.trv_kueche".

Steps to Reproduce

see description

Expected behavior:

I expect renaming to be handled more gracefully.

Actual behavior:

The log shows this exception multiple times:

2024-11-17 11:14:04.951 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/config/custom_components/better_thermostat/climate.py", line 794, in startup
    await init(self, trv)
  File "/config/custom_components/better_thermostat/adapters/delegate.py", line 46, in init
    return await self.real_trvs[entity_id]["adapter"].init(self, entity_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/better_thermostat/adapters/mqtt.py", line 47, in init
    ).state in (STATE_UNAVAILABLE, STATE_UNKNOWN, None):
      ^^^^^
AttributeError: 'NoneType' object has no attribute 'state'

Versions

BT: 1.6.1

HA:
Core 2024.11.2
Supervisor 2024.11.2
Operating System 13.2
Frontend 20241106.2

Additional Information

No additional information

@phdoerfler phdoerfler added the new bug incoming bug issue label Nov 17, 2024
@MrUhu
Copy link

MrUhu commented Nov 29, 2024

You are renaming the device inside home assistant.
Why should better Thermostat pick up the new name, if to this plugin it just looks like there is a new thermostat installed.
This behaviour is totally expected and not a bug.

I mean. Correct me if I'm wrong, but better Thermostat has no knowledge about changes within home assistant, so this is unfixable.
Just don't rename your thermostats or simply set up a new one within better Thermostat.

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

No branches or pull requests

3 participants