Commit 0bc597f 1 parent ec2f98d commit 0bc597f Copy full SHA for 0bc597f
File tree 3 files changed +4
-4
lines changed
3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def __init__(
47
47
domain : str | None ,
48
48
blueprint_name : str | None ,
49
49
blueprint_data : Any ,
50
- msg_or_exc : vol .Invalid ,
50
+ msg_or_exc : str | vol .Invalid ,
51
51
) -> None :
52
52
"""Initialize an invalid blueprint error."""
53
53
if isinstance (msg_or_exc , vol .Invalid ):
Original file line number Diff line number Diff line change @@ -70,11 +70,11 @@ async def get(
70
70
if entity_ids_str := request .query .get ("entity" ):
71
71
try :
72
72
entity_ids = cv .entity_ids (entity_ids_str )
73
- except vol .Invalid :
73
+ except vol .Invalid as ex :
74
74
raise InvalidEntityFormatError (
75
75
f"Invalid entity id(s) encountered: { entity_ids_str } . "
76
76
"Format should be <domain>.<object_id>"
77
- ) from vol . Invalid
77
+ ) from ex
78
78
else :
79
79
entity_ids = None
80
80
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ async def __call__(
157
157
158
158
@callback
159
159
def async_handle_schema_error (
160
- discovery_payload : MQTTDiscoveryPayload , err : vol .MultipleInvalid
160
+ discovery_payload : MQTTDiscoveryPayload , err : vol .Invalid
161
161
) -> None :
162
162
"""Help handling schema errors on MQTT discovery messages."""
163
163
discovery_topic : str = discovery_payload .discovery_data [ATTR_DISCOVERY_TOPIC ]
You can’t perform that action at this time.
0 commit comments