NSPanel Pro: Incorrect MQTT templates for TRV cause repeated HA warnings

@JoJo @MichaelLearnsToCode NSPanel Pro generates MQTT entities for Zigbee TRV devices with hard‑coded value_template fields that assume all JSON attributes are always present.
TRV devices (e.g., eWeLink/Sonoff TRVZB) send different sets of attributes depending on mode and state, which results in repeated Home Assistant warnings:

Template variable warning: 'dict object' has no attribute 'operation_mode'
Template variable warning: 'dict object' has no attribute 'fault_code'
Template variable warning: 'dict object' has no attribute 'set_boost_mode_duration'
Template variable warning: 'dict object' has no attribute 'set_timer_mode_duration'
Template variable warning: 'dict object' has no attribute 'power_outage_memory'
Template variable warning: 'dict object' has no attribute 'comfort_settings_identify'
Template variable warning: 'dict object' has no attribute 'command_identify'

Cause:

NSPanel Pro publishes MQTT entities using templates like:
{{ value_json.operation_mode }}
These fail whenever the attribute is missing from the payload.

Expected behavior:

Use safe accessors to avoid warnings, for example:
{{ value_json.get('operation_mode') }}

Affected entities:
All TRV‑related MQTT entities generated by NSPanel Pro (operation_mode, fault_code, boost/timer durations, comfort/command identify, power_outage_memory).

Impact:
Home Assistant logs hundreds of warnings per hour, even though the device works correctly.

Suggested fix:
Update MQTT entity templates in NSPanel Pro firmware to use value_json.get() for all optional attributes.

Hi @jam3, as always, thank you very much for reporting issues. My colleague is verifying it right now. We’ll update you the progress ASAP.

1 Like

That would be great - thank you.

Here’s today’s excerpt from the logs:

Logger: homeassistant.helpers.template
Source: helpers/template/__init__.py:1750
First occurred: 13:04:15 (2227 occurrences)
Last logged: 14:48:01

Template variable warning: 'dict object' has no attribute 'comfort_settings_identify' when rendering '{{ value_json.comfort_settings_identify }}'
Template variable warning: 'dict object' has no attribute 'operation_mode' when rendering '{{ value_json.operation_mode }}'
Template variable warning: 'dict object' has no attribute 'set_timer_mode_duration' when rendering '{{ value_json.set_timer_mode_duration }}'
Template variable warning: 'dict object' has no attribute 'fault_code' when rendering '{{ value_json.fault_code }}'
Template variable warning: 'dict object' has no attribute 'set_boost_mode_duration' when rendering '{{ value_json.set_boost_mode_duration }}'

These numbers speak for themselves: 2227 warnings in a single day! This means my NSPanel Pro is sending a payload every dozen seconds or so, and most of those payloads do not contain these fields.

Thanks for the detailed report and your patience.
We’re currently carrying out some technical validation on this issue to ensure a better overall experience.
Really appreciate your feedback — it’s very helpful for us. We’ll keep you updated as soon as there’s any new progress.

Thank you.

Thanks again for the detailed report and for your patience. We’ve now confirmed the fix approach for this issue.

The fix is currently planned to be released in early March . At the same time, we will also include some additional optimizations related to device synchronization with Home Assistant, if applicable.

We really appreciate your feedback — it’s been very helpful in improving the overall HA integration experience.

1 Like

Thanks for analyzing the report — it’s good to know my observations are actually useful.

Since the optimization is planned for March, I’ll need to find a temporary way to deal with the payload‑spamming issue, but that’s manageable. I hope :slight_smile: