home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.3k stars 30.62k forks source link

Channel name for Shelly Dual Cover is the same as the device name #125074

Closed DerT94 closed 1 month ago

DerT94 commented 2 months ago

The problem

If no name has been assigned to the “Cover”, it should be given a generic name. However, the entity is named identically to the device

This configuration image image image

creates the following device image image image

If the channel is named in the Shelly, the new name is also selected as expected when it is created.

image Only the “automatic” generation of the name seems to be a problem

What version of Home Assistant Core has the issue?

core-2024.8.3

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

shelly

Link to integration documentation on our website

https://www.home-assistant.io/integrations/shelly/#shelly-device-configuration-generation-2-and-3

Diagnostics information

2024-09-02 13:45:01.677 DEBUG (MainThread) [homeassistant.components.shelly] Setting up online RPC device -01
2024-09-02 13:45:01.677 DEBUG (MainThread) [aioshelly.rpc_device.device] host 10.30.1.16:80: RPC device initialize
2024-09-02 13:45:01.686 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] Trying to connect to device at 10.30.1.16
2024-09-02 13:45:01.692 INFO (MainThread) [aioshelly.rpc_device.wsrpc] Connected to 10.30.1.16
2024-09-02 13:45:01.693 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] send(10.30.1.16:80): {'id': 1, 'method': 'Shelly.GetConfig', 'src': 'aios-139914686806160'}
2024-09-02 13:45:01.721 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] recv(10.30.1.16:80): {'id': 1, 'src': 'shellypro2cover-3ce90e6ee314', 'dst': 'aios-139914686806160', 'result': {'ble': {'enable': False, 'rpc': {'enable': False}, 'observer': {'enable': False}}, 'bthome': {}, 'cloud': {'enable': False, 'server': 'iot.shelly.cloud:6012/jrpc'}, 'cover:0': {'id': 0, 'name': None, 'motor': {'idle_power_thr': 2.0, 'idle_confirm_period': 0.25}, 'maxtime_open': 60.0, 'maxtime_close': 60.0, 'initial_state': 'stopped', 'invert_directions': False, 'in_mode': 'dual', 'swap_inputs': False, 'safety_switch': {'enable': False, 'direction': 'both', 'action': 'stop', 'allowed_move': None}, 'power_limit': 4480, 'voltage_limit': 280, 'undervoltage_limit': 0, 'current_limit': 16.0, 'obstruction_detection': {'enable': False, 'direction': 'both', 'action': 'stop', 'power_thr': 142, 'holdoff': 1.0}}, 'cover:1': {'id': 1, 'name': None, 'motor': {'idle_power_thr': 2.0, 'idle_confirm_period': 0.25}, 'maxtime_open': 60.0, 'maxtime_close': 60.0, 'initial_state': 'stopped', 'invert_directions': True, 'in_mode': 'dual', 'swap_inputs': False, 'safety_switch': {'enable': False, 'direction': 'both', 'action': 'stop', 'allowed_move': None}, 'power_limit': 4480, 'voltage_limit': 280, 'undervoltage_limit': 0, 'current_limit': 16.0, 'obstruction_detection': {'enable': False, 'direction': 'both', 'action': 'stop', 'power_thr': 150, 'holdoff': 1.0}}, 'eth': {'enable': True, 'ipv4mode': 'dhcp', 'ip': None, 'netmask': None, 'gw': None, 'nameserver': None}, 'input:0': {'id': 0, 'name': None, 'type': 'button', 'enable': True, 'invert': False}, 'input:1': {'id': 1, 'name': None, 'type': 'button', 'enable': True, 'invert': False}, 'input:2': {'id': 2, 'name': None, 'type': 'button', 'enable': True, 'invert': False}, 'input:3': {'id': 3, 'name': None, 'type': 'button', 'enable': True, 'invert': False}, 'knx': {'enable': False, 'ia': '15.15.255', 'routing': {'addr': '224.0.23.12:3671'}}, 'mqtt': {'enable': False, 'server': None, 'client_id': 'shellypro2cover-3ce90e6ee314', 'user': None, 'ssl_ca': None, 'topic_prefix': 'shellypro2cover-3ce90e6ee314', 'rpc_ntf': True, 'status_ntf': False, 'use_client_cert': False, 'enable_rpc': True, 'enable_control': True}, 'sys': {'device': {'name': 'SPDC-01', 'mac': '3CE90E6EE314', 'fw_id': '20240819-074544/1.4.2-gc2639da', 'discoverable': True, 'eco_mode': False}, 'location': {'tz': 'Europe/Berlin', 'lat': 50.0327, 'lon': 10.5136}, 'debug': {'level': 2, 'file_level': None, 'mqtt': {'enable': False}, 'websocket': {'enable': False}, 'udp': {'addr': None}}, 'ui_data': {'cover1': ''}, 'rpc_udp': {'dst_addr': None, 'listen_port': None}, 'sntp': {'server': 'time.google.com'}, 'cfg_rev': 37}, 'ui': {'idle_brightness': 30}, 'wifi': {'ap': {'ssid': 'ShellyPro2Cover-3CE90E6EE314', 'is_open': True, 'enable': False, 'range_extender': {'enable': False}}, 'sta': {'ssid': None, 'is_open': True, 'enable': False, 'ipv4mode': 'dhcp', 'ip': None, 'netmask': None, 'gw': None, 'nameserver': None}, 'sta1': {'ssid': None, 'is_open': True, 'enable': False, 'ipv4mode': 'dhcp', 'ip': None, 'netmask': None, 'gw': None, 'nameserver': None}, 'roam': {'rssi_thr': -80, 'interval': 60}}, 'ws': {'enable': False, 'server': None, 'ssl_ca': 'ca.pem'}}}
2024-09-02 13:45:01.722 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] Shelly.GetConfig(None) -> {'id': 1, 'src': 'shellypro2cover-3ce90e6ee314', 'dst': 'aios-139914686806160', 'result': {'ble': {'enable': False, 'rpc': {'enable': False}, 'observer': {'enable': False}}, 'bthome': {}, 'cloud': {'enable': False, 'server': 'iot.shelly.cloud:6012/jrpc'}, 'cover:0': {'id': 0, 'name': None, 'motor': {'idle_power_thr': 2.0, 'idle_confirm_period': 0.25}, 'maxtime_open': 60.0, 'maxtime_close': 60.0, 'initial_state': 'stopped', 'invert_directions': False, 'in_mode': 'dual', 'swap_inputs': False, 'safety_switch': {'enable': False, 'direction': 'both', 'action': 'stop', 'allowed_move': None}, 'power_limit': 4480, 'voltage_limit': 280, 'undervoltage_limit': 0, 'current_limit': 16.0, 'obstruction_detection': {'enable': False, 'direction': 'both', 'action': 'stop', 'power_thr': 142, 'holdoff': 1.0}}, 'cover:1': {'id': 1, 'name': None, 'motor': {'idle_power_thr': 2.0, 'idle_confirm_period': 0.25}, 'maxtime_open': 60.0, 'maxtime_close': 60.0, 'initial_state': 'stopped', 'invert_directions': True, 'in_mode': 'dual', 'swap_inputs': False, 'safety_switch': {'enable': False, 'direction': 'both', 'action': 'stop', 'allowed_move': None}, 'power_limit': 4480, 'voltage_limit': 280, 'undervoltage_limit': 0, 'current_limit': 16.0, 'obstruction_detection': {'enable': False, 'direction': 'both', 'action': 'stop', 'power_thr': 150, 'holdoff': 1.0}}, 'eth': {'enable': True, 'ipv4mode': 'dhcp', 'ip': None, 'netmask': None, 'gw': None, 'nameserver': None}, 'input:0': {'id': 0, 'name': None, 'type': 'button', 'enable': True, 'invert': False}, 'input:1': {'id': 1, 'name': None, 'type': 'button', 'enable': True, 'invert': False}, 'input:2': {'id': 2, 'name': None, 'type': 'button', 'enable': True, 'invert': False}, 'input:3': {'id': 3, 'name': None, 'type': 'button', 'enable': True, 'invert': False}, 'knx': {'enable': False, 'ia': '15.15.255', 'routing': {'addr': '224.0.23.12:3671'}}, 'mqtt': {'enable': False, 'server': None, 'client_id': 'shellypro2cover-3ce90e6ee314', 'user': None, 'ssl_ca': None, 'topic_prefix': 'shellypro2cover-3ce90e6ee314', 'rpc_ntf': True, 'status_ntf': False, 'use_client_cert': False, 'enable_rpc': True, 'enable_control': True}, 'sys': {'device': {'name': 'SPDC-01', 'mac': '3CE90E6EE314', 'fw_id': '20240819-074544/1.4.2-gc2639da', 'discoverable': True, 'eco_mode': False}, 'location': {'tz': 'Europe/Berlin', 'lat': 50.0327, 'lon': 10.5136}, 'debug': {'level': 2, 'file_level': None, 'mqtt': {'enable': False}, 'websocket': {'enable': False}, 'udp': {'addr': None}}, 'ui_data': {'cover1': ''}, 'rpc_udp': {'dst_addr': None, 'listen_port': None}, 'sntp': {'server': 'time.google.com'}, 'cfg_rev': 37}, 'ui': {'idle_brightness': 30}, 'wifi': {'ap': {'ssid': 'ShellyPro2Cover-3CE90E6EE314', 'is_open': True, 'enable': False, 'range_extender': {'enable': False}}, 'sta': {'ssid': None, 'is_open': True, 'enable': False, 'ipv4mode': 'dhcp', 'ip': None, 'netmask': None, 'gw': None, 'nameserver': None}, 'sta1': {'ssid': None, 'is_open': True, 'enable': False, 'ipv4mode': 'dhcp', 'ip': None, 'netmask': None, 'gw': None, 'nameserver': None}, 'roam': {'rssi_thr': -80, 'interval': 60}}, 'ws': {'enable': False, 'server': None, 'ssl_ca': 'ca.pem'}}}
2024-09-02 13:45:01.722 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] send(10.30.1.16:80): {'id': 2, 'method': 'Shelly.GetStatus', 'src': 'aios-139914686806160', 'dst': 'shellypro2cover-3ce90e6ee314'}
2024-09-02 13:45:01.748 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] recv(10.30.1.16:80): {'id': 2, 'src': 'shellypro2cover-3ce90e6ee314', 'dst': 'aios-139914686806160', 'result': {'ble': {}, 'bthome': {'errors': ['bluetooth_disabled']}, 'cloud': {'connected': False}, 'cover:0': {'id': 0, 'source': 'limit_switch', 'state': 'closed', 'apower': 0.0, 'voltage': 229.6, 'current': 0.0, 'pf': 0.0, 'freq': 50.0, 'aenergy': {'total': 6.229, 'by_minute': [0.0, 0.0, 0.0], 'minute_ts': 1725277500}, 'temperature': {'tC': 40.7, 'tF': 105.3}, 'pos_control': True, 'last_direction': 'close', 'current_pos': 0}, 'cover:1': {'id': 1, 'source': 'limit_switch', 'state': 'closed', 'apower': 0.0, 'voltage': 229.8, 'current': 0.0, 'pf': 0.0, 'freq': 50.0, 'aenergy': {'total': 4.553, 'by_minute': [0.0, 0.0, 0.0], 'minute_ts': 1725277500}, 'temperature': {'tC': 40.7, 'tF': 105.3}, 'pos_control': True, 'last_direction': 'close', 'current_pos': 0}, 'eth': {'ip': '10.30.1.16'}, 'input:0': {'id': 0, 'state': None}, 'input:1': {'id': 1, 'state': None}, 'input:2': {'id': 2, 'state': None}, 'input:3': {'id': 3, 'state': None}, 'knx': {}, 'mqtt': {'connected': False}, 'sys': {'mac': '3CE90E6EE314', 'restart_required': False, 'time': '13:45', 'unixtime': 1725277501, 'uptime': 79330, 'ram_size': 248224, 'ram_free': 121220, 'fs_size': 524288, 'fs_free': 188416, 'cfg_rev': 37, 'kvs_rev': 0, 'schedule_rev': 0, 'webhook_rev': 0, 'available_updates': {}, 'reset_reason': 3}, 'ui': {}, 'wifi': {'sta_ip': None, 'status': 'disconnected', 'ssid': None, 'rssi': 0}, 'ws': {'connected': False}}}
2024-09-02 13:45:01.749 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] Shelly.GetStatus(None) -> {'id': 2, 'src': 'shellypro2cover-3ce90e6ee314', 'dst': 'aios-139914686806160', 'result': {'ble': {}, 'bthome': {'errors': ['bluetooth_disabled']}, 'cloud': {'connected': False}, 'cover:0': {'id': 0, 'source': 'limit_switch', 'state': 'closed', 'apower': 0.0, 'voltage': 229.6, 'current': 0.0, 'pf': 0.0, 'freq': 50.0, 'aenergy': {'total': 6.229, 'by_minute': [0.0, 0.0, 0.0], 'minute_ts': 1725277500}, 'temperature': {'tC': 40.7, 'tF': 105.3}, 'pos_control': True, 'last_direction': 'close', 'current_pos': 0}, 'cover:1': {'id': 1, 'source': 'limit_switch', 'state': 'closed', 'apower': 0.0, 'voltage': 229.8, 'current': 0.0, 'pf': 0.0, 'freq': 50.0, 'aenergy': {'total': 4.553, 'by_minute': [0.0, 0.0, 0.0], 'minute_ts': 1725277500}, 'temperature': {'tC': 40.7, 'tF': 105.3}, 'pos_control': True, 'last_direction': 'close', 'current_pos': 0}, 'eth': {'ip': '10.30.1.16'}, 'input:0': {'id': 0, 'state': None}, 'input:1': {'id': 1, 'state': None}, 'input:2': {'id': 2, 'state': None}, 'input:3': {'id': 3, 'state': None}, 'knx': {}, 'mqtt': {'connected': False}, 'sys': {'mac': '3CE90E6EE314', 'restart_required': False, 'time': '13:45', 'unixtime': 1725277501, 'uptime': 79330, 'ram_size': 248224, 'ram_free': 121220, 'fs_size': 524288, 'fs_free': 188416, 'cfg_rev': 37, 'kvs_rev': 0, 'schedule_rev': 0, 'webhook_rev': 0, 'available_updates': {}, 'reset_reason': 3}, 'ui': {}, 'wifi': {'sta_ip': None, 'status': 'disconnected', 'ssid': None, 'rssi': 0}, 'ws': {'connected': False}}}
2024-09-02 13:45:01.749 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] send(10.30.1.16:80): {'id': 3, 'method': 'Shelly.GetComponents', 'src': 'aios-139914686806160', 'params': {'dynamic_only': True}, 'dst': 'shellypro2cover-3ce90e6ee314'}
2024-09-02 13:45:01.768 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] recv(10.30.1.16:80): {'id': 3, 'src': 'shellypro2cover-3ce90e6ee314', 'dst': 'aios-139914686806160', 'result': {'components': [], 'cfg_rev': 37, 'offset': 0, 'total': 0}}
2024-09-02 13:45:01.768 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] Shelly.GetComponents({'dynamic_only': True}) -> {'id': 3, 'src': 'shellypro2cover-3ce90e6ee314', 'dst': 'aios-139914686806160', 'result': {'components': [], 'cfg_rev': 37, 'offset': 0, 'total': 0}}
2024-09-02 13:45:01.768 DEBUG (MainThread) [aioshelly.rpc_device.device] host 10.30.1.16:80: RPC device init finished
2024-09-02 13:45:01.769 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] send(10.30.1.16:80): {'id': 4, 'method': 'Script.List', 'src': 'aios-139914686806160', 'dst': 'shellypro2cover-3ce90e6ee314'}
2024-09-02 13:45:01.793 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] recv(10.30.1.16:80): {'id': 4, 'src': 'shellypro2cover-3ce90e6ee314', 'dst': 'aios-139914686806160', 'result': {'scripts': []}}
2024-09-02 13:45:01.794 DEBUG (MainThread) [aioshelly.rpc_device.wsrpc] Script.List(None) -> {'id': 4, 'src': 'shellypro2cover-3ce90e6ee314', 'dst': 'aios-139914686806160', 'result': {'scripts': []}}

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @balloob, @bieniu, @thecode, @chemelli74, @bdraco, mind taking a look at this issue as it has been labeled with an integration (shelly) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `shelly` 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 shelly` 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)


shelly documentation shelly source (message by IssueLinks)

thecode commented 2 months ago

Correct, it should append the cover ID (Cover 0 & Cover 1) to the entity, I will take a look at this