Dictionary Lookup Throws Exception And Halts Automation Latest HA Update

by ADMIN 73 views

Introduction

Home Assistant (HA) is a popular open-source home automation platform that allows users to control and monitor their smart home devices. However, with the latest update to HA, version 2025.3.2, users have reported an issue with dictionary lookups that throw exceptions and halt automation. In this article, we will explore the problem, identify the affected version of Home Assistant Core, and provide a solution to resolve the issue.

The Problem

Automations that were working with version 2025.2.5 are failing with version 2025.3.2. The failure is a dictionary lookup where the key/attribute is not found, and the lookup is nested within a larger expression. For example:

{{ heat['attribute'] | float(0) + heat['attribute2'] | float(0) }}

With version 2025.3.2, the automation is halted with an error message indicating a missing attribute. However, with version 2025.2.5, this would not yield an error, but instead provide the default value.

What Version of Home Assistant Core Has the Issue?

The issue is present in version 2025.3.2 of Home Assistant Core.

What Was the Last Working Version of Home Assistant Core?

The last working version of Home Assistant Core was version 2025.2.5.

What Type of Installation Are You Running?

The issue is reported on Home Assistant OS.

Integration Causing the Issue

No specific integration is identified as the cause of the issue.

Link to Integration Documentation on Our Website

No link to integration documentation is provided.

Diagnostics Information

No diagnostics information is provided.

Example YAML Snippet

{{ heat['attribute'] | float(0) + heat['attribute2'] | float(0) }}

#Note that the attribute is indeed missing, but this used to continue on with 2025.2 and prior.

Anything in the Logs that Might Be Useful for Us?

No logs are provided.

Additional Information

No additional information is provided.

Workaround

A workaround for the issue is to use a temporary variable to store the result of the dictionary lookup, as shown in the following example:

temp1: "{{ heat['attribute'] }}"
temp2: "{{ heat['attribute2'] }}"
{{ temp1 | float(0) + temp2 | float(0) }}

This workaround works in version 2025.3.2 without error, despite the attribute being missing.

Conclusion

The dictionary lookup issue in version 2025.3.2 of Home Assistant Core is a known problem that can be resolved by using a temporary variable to store the result of the dictionary lookup. We recommend updating to the latest version of Home Assistant Core and using the workaround to resolve the issue.

Future Development

We will continue to monitor the issue and provide updates on any changes or fixes. In the meantime, we recommend using the workaround to resolve the issue.

Related Issues

Acknowledgments

Q: What is the issue with dictionary lookups in Home Assistant Core version 2025.3.2?

A: The issue is that dictionary lookups that are nested within a larger expression and have a missing key/attribute will throw an exception and halt automation.

Q: What is the affected version of Home Assistant Core?

A: The affected version is 2025.3.2.

Q: What was the last working version of Home Assistant Core?

A: The last working version was 2025.2.5.

Q: What type of installation are you running?

A: The issue is reported on Home Assistant OS.

Q: Is there a specific integration causing the issue?

A: No specific integration is identified as the cause of the issue.

Q: What is the workaround for the issue?

A: A workaround is to use a temporary variable to store the result of the dictionary lookup, as shown in the following example:

temp1: "{{ heat['attribute'] }}"
temp2: "{{ heat['attribute2'] }}"
{{ temp1 | float(0) + temp2 | float(0) }}

Q: Why does the workaround work?

A: The workaround works because it avoids the nested dictionary lookup that is causing the issue.

Q: Is there a fix for the issue?

A: No fix is available at this time. However, we recommend using the workaround to resolve the issue.

Q: Will the issue be fixed in a future update?

A: We will continue to monitor the issue and provide updates on any changes or fixes. In the meantime, we recommend using the workaround to resolve the issue.

Q: Where can I find more information about the issue?

A: You can find more information about the issue on the Home Assistant GitHub page, specifically in the issues section.

Q: How can I report a similar issue?

A: If you experience a similar issue, please report it on the Home Assistant GitHub page, specifically in the issues section.

Q: Can I get help with implementing the workaround?

A: Yes, you can get help with implementing the workaround by reaching out to the Home Assistant community on the forums or Discord channel.

Q: Is there a way to prevent the issue from occurring in the first place?

A: Yes, you can prevent the issue from occurring by avoiding nested dictionary lookups or by using the workaround.

Q: Can I get a refund for the issue?

A: No, there is no refund available for the issue. However, we recommend using the workaround to resolve the issue.

Q: How can I stay up-to-date with the latest information about the issue?

A: You can stay up-to-date with the latest information about the issue by following the Home Assistant blog or by checking the Home Assistant GitHub page regularly.