mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 04:50:05 +00:00
Change naming of MQTT entities to correspond with HA guidelines (#95159)
* Set has_entity_name if device_name is set * revert unneeded formatting change * Add image platform * Follow up comment * Don't set `has_entity_name` without device name * Only set has_entity_name if a valid name is set * Follow device_class name and add tests * Follow up comments add extra tests * Move to helper - Log a warning * fix test * Allow to assign None as name explictly * Refactor * Log info messages when device name is not set * Revert scene schema change - no device link * Always set has_entity_name with device mapping * Always set `_attr_has_entity_name` * Cleanup
This commit is contained in:
@@ -2821,7 +2821,7 @@ async def test_mqtt_ws_get_device_debug_info(
|
||||
expected_result = {
|
||||
"entities": [
|
||||
{
|
||||
"entity_id": "sensor.mqtt_sensor",
|
||||
"entity_id": "sensor.none_mqtt_sensor",
|
||||
"subscriptions": [{"topic": "foobar/sensor", "messages": []}],
|
||||
"discovery_data": {
|
||||
"payload": config_sensor,
|
||||
@@ -2884,7 +2884,7 @@ async def test_mqtt_ws_get_device_debug_info_binary(
|
||||
expected_result = {
|
||||
"entities": [
|
||||
{
|
||||
"entity_id": "camera.mqtt_camera",
|
||||
"entity_id": "camera.none_mqtt_camera",
|
||||
"subscriptions": [
|
||||
{
|
||||
"topic": "foobar/image",
|
||||
|
||||
Reference in New Issue
Block a user