mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 06:33:51 +00:00
cleanup
This commit is contained in:
@@ -86,6 +86,22 @@ binary_sensor:
|
||||
device_id: controller_2
|
||||
lambda: return false;
|
||||
|
||||
# Issue #6953: Empty names on binary sensors
|
||||
- platform: template
|
||||
name: ""
|
||||
lambda: return true;
|
||||
- platform: template
|
||||
name: ""
|
||||
lambda: return false;
|
||||
|
||||
- platform: template
|
||||
name: ""
|
||||
lambda: return true;
|
||||
|
||||
- platform: template
|
||||
name: ""
|
||||
lambda: return false;
|
||||
|
||||
# Scenario 6: Test with special characters that need sanitization
|
||||
text_sensor:
|
||||
- platform: template
|
||||
@@ -116,3 +132,80 @@ switch:
|
||||
lambda: return true;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
# Scenario 8: Issue #6953 - Multiple entities with empty names
|
||||
# Empty names on main device - should use device name with suffixes
|
||||
- platform: template
|
||||
name: ""
|
||||
lambda: return false;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
- platform: template
|
||||
name: ""
|
||||
lambda: return true;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
- platform: template
|
||||
name: ""
|
||||
lambda: return false;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
# Scenario 9: Issue #6953 - Empty names on sub-devices
|
||||
# Empty names on sub-device - should use sub-device name with suffixes
|
||||
- platform: template
|
||||
name: ""
|
||||
device_id: controller_1
|
||||
lambda: return false;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
- platform: template
|
||||
name: ""
|
||||
device_id: controller_1
|
||||
lambda: return true;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
- platform: template
|
||||
name: ""
|
||||
device_id: controller_1
|
||||
lambda: return false;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
# Empty names on different sub-device
|
||||
- platform: template
|
||||
name: ""
|
||||
device_id: controller_2
|
||||
lambda: return false;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
- platform: template
|
||||
name: ""
|
||||
device_id: controller_2
|
||||
lambda: return true;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
# Scenario 10: Issue #6953 - Duplicate "xyz" names
|
||||
- platform: template
|
||||
name: "xyz"
|
||||
lambda: return false;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
- platform: template
|
||||
name: "xyz"
|
||||
lambda: return true;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
- platform: template
|
||||
name: "xyz"
|
||||
lambda: return false;
|
||||
turn_on_action: []
|
||||
turn_off_action: []
|
||||
|
||||
Reference in New Issue
Block a user