JurajNyiri / HomeAssistant-Tapo-Control

Control for Tapo cameras as a Home Assistant component
Apache License 2.0
957 stars 80 forks source link

Config entry name resets on reconfiguration #450

Open codyc1515 opened 8 months ago

codyc1515 commented 8 months ago

Description

When a device is reconfigured the original config entry name disappears and is replaced by the IP Address of the device instead.

After renaming - expected:

image

After re-configuring - unexpected:

image

Reproduction Steps

  1. Browse to Devices & services -> Tapo: Cameras Control -> Camera name
  2. From the dots, select Rename and choose a device name - observe that the config entry name is set
  3. Select the Configure button, Action = Configure device and Submit
  4. Notice that the config entry name is reset from the one set in step two back to the device's IP Address

Expected behavior

Original config entry name should be retained.

If applicable, add error logs.

No response

Device Firmware

1.3.6 Build 230424 Rel.77225n(4555)

Integration Version

5.4.2

Using stream component

Yes

Does camera work via official integrations?

Yes

Camera has all attributes filled out in developer tools

Yes

HASS Environment

OS

Search for similar issues

Yes

Additional information

access_token: xxx
model_name: C200
brand: TP-Link
motion_detection: on
frontend_stream_type: hls
device_type: SMART.IPCAMERA
device_model: C200
device_name: C200 1.0
device_info: C200 1.0 IPC
hw_version: 1.0
sw_version: 1.3.6 Build 230424 Rel.77225n(4555)
device_alias: Dining Room Camera
avatar: camera c212
longitude: 0
latitude: 0
has_set_location_info: 0
features: 3
barcode: 
mac: 28-EE-52-93-E9-D3
dev_id: 80215ACBBFF1B116E989BD4366B7BBF31E273DDA
oem_id: 8902D2F34FCE407721DE92F5759839C2
hw_desc: 48574445534300000000000000000001
alarm: off
user: homeassistant
presets: 
{}

record_plan: 
sunday: '["0000-2400:2"]'
monday: '["0000-2400:2"]'
tuesday: '["0000-2400:2"]'
wednesday: '["0000-2400:2"]'
thursday: '["0000-2400:2"]'
friday: '["0000-2400:2"]'
saturday: '["0000-2400:2"]'

entity_picture: /api/camera_proxy/camera.dining_room?token=xxx
icon: mdi:webcam
friendly_name: Dining Room Camera
supported_features: 3