Skip to content

Commit 916b436

Browse files
authored
Bump aioesphomeapi to 36.0.1 (home-assistant#148991)
1 parent 4c99fe9 commit 916b436

29 files changed

+8
-205
lines changed

homeassistant/components/esphome/entry_data.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -295,23 +295,7 @@ async def async_update_static_infos(
295295
needed_platforms.add(Platform.BINARY_SENSOR)
296296
needed_platforms.add(Platform.SELECT)
297297

298-
ent_reg = er.async_get(hass)
299-
registry_get_entity = ent_reg.async_get_entity_id
300-
for info in infos:
301-
platform = INFO_TYPE_TO_PLATFORM[type(info)]
302-
needed_platforms.add(platform)
303-
# If the unique id is in the old format, migrate it
304-
# except if they downgraded and upgraded, there might be a duplicate
305-
# so we want to keep the one that was already there.
306-
if (
307-
(old_unique_id := info.unique_id)
308-
and (old_entry := registry_get_entity(platform, DOMAIN, old_unique_id))
309-
and (new_unique_id := build_device_unique_id(mac, info))
310-
!= old_unique_id
311-
and not registry_get_entity(platform, DOMAIN, new_unique_id)
312-
):
313-
ent_reg.async_update_entity(old_entry, new_unique_id=new_unique_id)
314-
298+
needed_platforms.update(INFO_TYPE_TO_PLATFORM[type(info)] for info in infos)
315299
await self._ensure_platforms_loaded(hass, entry, needed_platforms)
316300

317301
# Make a dict of the EntityInfo by type and send

homeassistant/components/esphome/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"mqtt": ["esphome/discover/#"],
1818
"quality_scale": "platinum",
1919
"requirements": [
20-
"aioesphomeapi==35.0.0",
20+
"aioesphomeapi==36.0.1",
2121
"esphome-dashboard-api==1.3.0",
2222
"bleak-esphome==3.1.0"
2323
],

requirements_all.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements_test_all.txt

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/components/esphome/test_alarm_control_panel.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ async def test_generic_alarm_control_panel_requires_code(
4040
object_id="myalarm_control_panel",
4141
key=1,
4242
name="my alarm_control_panel",
43-
unique_id="my_alarm_control_panel",
4443
supported_features=EspHomeACPFeatures.ARM_AWAY
4544
| EspHomeACPFeatures.ARM_CUSTOM_BYPASS
4645
| EspHomeACPFeatures.ARM_HOME
@@ -173,7 +172,6 @@ async def test_generic_alarm_control_panel_no_code(
173172
object_id="myalarm_control_panel",
174173
key=1,
175174
name="my alarm_control_panel",
176-
unique_id="my_alarm_control_panel",
177175
supported_features=EspHomeACPFeatures.ARM_AWAY
178176
| EspHomeACPFeatures.ARM_CUSTOM_BYPASS
179177
| EspHomeACPFeatures.ARM_HOME
@@ -219,7 +217,6 @@ async def test_generic_alarm_control_panel_missing_state(
219217
object_id="myalarm_control_panel",
220218
key=1,
221219
name="my alarm_control_panel",
222-
unique_id="my_alarm_control_panel",
223220
supported_features=EspHomeACPFeatures.ARM_AWAY
224221
| EspHomeACPFeatures.ARM_CUSTOM_BYPASS
225222
| EspHomeACPFeatures.ARM_HOME

tests/components/esphome/test_assist_satellite.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,6 @@ async def test_tts_format_from_media_player(
953953
object_id="mymedia_player",
954954
key=1,
955955
name="my media_player",
956-
unique_id="my_media_player",
957956
supports_pause=True,
958957
supported_formats=[
959958
MediaPlayerSupportedFormat(
@@ -1020,7 +1019,6 @@ async def test_tts_minimal_format_from_media_player(
10201019
object_id="mymedia_player",
10211020
key=1,
10221021
name="my media_player",
1023-
unique_id="my_media_player",
10241022
supports_pause=True,
10251023
supported_formats=[
10261024
MediaPlayerSupportedFormat(
@@ -1156,7 +1154,6 @@ async def test_announce_media_id(
11561154
object_id="mymedia_player",
11571155
key=1,
11581156
name="my media_player",
1159-
unique_id="my_media_player",
11601157
supports_pause=True,
11611158
supported_formats=[
11621159
MediaPlayerSupportedFormat(
@@ -1437,7 +1434,6 @@ async def test_start_conversation_media_id(
14371434
object_id="mymedia_player",
14381435
key=1,
14391436
name="my media_player",
1440-
unique_id="my_media_player",
14411437
supports_pause=True,
14421438
supported_formats=[
14431439
MediaPlayerSupportedFormat(

tests/components/esphome/test_binary_sensor.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ async def test_binary_sensor_generic_entity(
2424
object_id="mybinary_sensor",
2525
key=1,
2626
name="my binary_sensor",
27-
unique_id="my_binary_sensor",
2827
)
2928
]
3029
esphome_state, hass_state = binary_state
@@ -52,7 +51,6 @@ async def test_status_binary_sensor(
5251
object_id="mybinary_sensor",
5352
key=1,
5453
name="my binary_sensor",
55-
unique_id="my_binary_sensor",
5654
is_status_binary_sensor=True,
5755
)
5856
]
@@ -80,7 +78,6 @@ async def test_binary_sensor_missing_state(
8078
object_id="mybinary_sensor",
8179
key=1,
8280
name="my binary_sensor",
83-
unique_id="my_binary_sensor",
8481
)
8582
]
8683
states = [BinarySensorState(key=1, state=True, missing_state=True)]
@@ -107,7 +104,6 @@ async def test_binary_sensor_has_state_false(
107104
object_id="mybinary_sensor",
108105
key=1,
109106
name="my binary_sensor",
110-
unique_id="my_binary_sensor",
111107
)
112108
]
113109
states = []
@@ -152,14 +148,12 @@ async def test_binary_sensors_same_key_different_device_id(
152148
object_id="sensor",
153149
key=1,
154150
name="Motion",
155-
unique_id="motion_1",
156151
device_id=11111111,
157152
),
158153
BinarySensorInfo(
159154
object_id="sensor",
160155
key=1,
161156
name="Motion",
162-
unique_id="motion_2",
163157
device_id=22222222,
164158
),
165159
]
@@ -235,14 +229,12 @@ async def test_binary_sensor_main_and_sub_device_same_key(
235229
object_id="main_sensor",
236230
key=1,
237231
name="Main Sensor",
238-
unique_id="main_1",
239232
device_id=0, # Main device
240233
),
241234
BinarySensorInfo(
242235
object_id="sub_sensor",
243236
key=1,
244237
name="Sub Sensor",
245-
unique_id="sub_1",
246238
device_id=11111111,
247239
),
248240
]

tests/components/esphome/test_button.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ async def test_button_generic_entity(
1818
object_id="mybutton",
1919
key=1,
2020
name="my button",
21-
unique_id="my_button",
2221
)
2322
]
2423
states = []

tests/components/esphome/test_camera.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ async def test_camera_single_image(
3030
object_id="mycamera",
3131
key=1,
3232
name="my camera",
33-
unique_id="my_camera",
3433
)
3534
]
3635
states = []
@@ -75,7 +74,6 @@ async def test_camera_single_image_unavailable_before_requested(
7574
object_id="mycamera",
7675
key=1,
7776
name="my camera",
78-
unique_id="my_camera",
7977
)
8078
]
8179
states = []
@@ -113,7 +111,6 @@ async def test_camera_single_image_unavailable_during_request(
113111
object_id="mycamera",
114112
key=1,
115113
name="my camera",
116-
unique_id="my_camera",
117114
)
118115
]
119116
states = []
@@ -155,7 +152,6 @@ async def test_camera_stream(
155152
object_id="mycamera",
156153
key=1,
157154
name="my camera",
158-
unique_id="my_camera",
159155
)
160156
]
161157
states = []
@@ -212,7 +208,6 @@ async def test_camera_stream_unavailable(
212208
object_id="mycamera",
213209
key=1,
214210
name="my camera",
215-
unique_id="my_camera",
216211
)
217212
]
218213
states = []
@@ -249,7 +244,6 @@ async def test_camera_stream_with_disconnection(
249244
object_id="mycamera",
250245
key=1,
251246
name="my camera",
252-
unique_id="my_camera",
253247
)
254248
]
255249
states = []

tests/components/esphome/test_climate.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ async def test_climate_entity(
5858
object_id="myclimate",
5959
key=1,
6060
name="my climate",
61-
unique_id="my_climate",
6261
supports_current_temperature=True,
6362
supports_action=True,
6463
visual_min_temperature=10.0,
@@ -110,7 +109,6 @@ async def test_climate_entity_with_step_and_two_point(
110109
object_id="myclimate",
111110
key=1,
112111
name="my climate",
113-
unique_id="my_climate",
114112
supports_current_temperature=True,
115113
supports_two_point_target_temperature=True,
116114
visual_target_temperature_step=2,
@@ -187,7 +185,6 @@ async def test_climate_entity_with_step_and_target_temp(
187185
object_id="myclimate",
188186
key=1,
189187
name="my climate",
190-
unique_id="my_climate",
191188
supports_current_temperature=True,
192189
visual_target_temperature_step=2,
193190
visual_current_temperature_step=2,
@@ -345,7 +342,6 @@ async def test_climate_entity_with_humidity(
345342
object_id="myclimate",
346343
key=1,
347344
name="my climate",
348-
unique_id="my_climate",
349345
supports_current_temperature=True,
350346
supports_two_point_target_temperature=True,
351347
supports_action=True,
@@ -409,7 +405,6 @@ async def test_climate_entity_with_inf_value(
409405
object_id="myclimate",
410406
key=1,
411407
name="my climate",
412-
unique_id="my_climate",
413408
supports_current_temperature=True,
414409
supports_two_point_target_temperature=True,
415410
supports_action=True,
@@ -465,7 +460,6 @@ async def test_climate_entity_attributes(
465460
object_id="myclimate",
466461
key=1,
467462
name="my climate",
468-
unique_id="my_climate",
469463
supports_current_temperature=True,
470464
visual_target_temperature_step=2,
471465
visual_current_temperature_step=2,
@@ -520,7 +514,6 @@ async def test_climate_entity_attribute_current_temperature_unsupported(
520514
object_id="myclimate",
521515
key=1,
522516
name="my climate",
523-
unique_id="my_climate",
524517
supports_current_temperature=False,
525518
)
526519
]

0 commit comments

Comments
 (0)