Skip to content

Avoid returning None for oven target_temperature#457

Open
bxthomas wants to merge 1 commit intosimbaja:masterfrom
bxthomas:master
Open

Avoid returning None for oven target_temperature#457
bxthomas wants to merge 1 commit intosimbaja:masterfrom
bxthomas:master

Conversation

@bxthomas
Copy link
Copy Markdown

When the oven is off, current_cook_setting.temperature may be None. This causes target_temperature to return None, which breaks downstream consumers that expect a numeric value (e.g. Google Assistant device state serialization).

Return a valid numeric temperature instead of None so the oven entity always exposes a stable target_temperature value.

This prevents Google Assistant queries from failing with: TypeError: float() argument must be a string or a real number, not 'NoneType'

When the oven is off, current_cook_setting.temperature may be None.
This causes target_temperature to return None, which breaks downstream
consumers that expect a numeric value (e.g. Google Assistant device
state serialization).

Return a valid numeric temperature instead of None so the oven entity
always exposes a stable target_temperature value.

This prevents Google Assistant queries from failing with:
TypeError: float() argument must be a string or a real number, not 'NoneType'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant