Commit 48ca63c 1 parent 0acd562 commit 48ca63c Copy full SHA for 48ca63c
File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1184,6 +1184,26 @@ async def test_climate(
1184
1184
assert responses .calls [32 ].request .body == '{"value": "windNice", "path": "/operationModes/cooling/fanDirection/vertical/currentMode"}'
1185
1185
assert hass .states .get ("climate.werkkamer_room_temperature" ).attributes ["swing_mode" ] == "windnice"
1186
1186
1187
+ responses .put (
1188
+ DAIKIN_API_URL
1189
+ + "/v1/gateway-devices/1ece521b-5401-4a42-acce-6f76fba246aa/management-points/climateControlMainZone/schedule/cooling/current" ,
1190
+ status = 429 ,
1191
+ headers = {"X-RateLimit-Limit-minute" : "0" , "X-RateLimit-Limit-day" : "0" },
1192
+ )
1193
+ # Set the device with schedule 'User defined' enabled, this should fail due to the rate limit
1194
+ await hass .services .async_call (
1195
+ SELECT_DOMAIN ,
1196
+ SERVICE_SELECT_OPTION ,
1197
+ {ATTR_ENTITY_ID : "select.altherma_climatecontrol_schedule" , ATTR_OPTION : "User defined" },
1198
+ blocking = True ,
1199
+ )
1200
+ await hass .async_block_till_done ()
1201
+
1202
+ assert len (responses .calls ) == 34
1203
+ assert responses .calls [33 ].request .body == '{"scheduleId": "scheduleCoolingRT1", "enabled": true}'
1204
+ assert hass .states .get ("select.altherma_climatecontrol_schedule" ).state == SCHEDULE_OFF
1205
+
1206
+
1187
1207
1188
1208
async def test_minimal_data (
1189
1209
hass : HomeAssistant ,
You can’t perform that action at this time.
0 commit comments