NsPanelPro 4.4.6 MQTT > HA log spam from missing JSON keys / empty event_type

After enabling NSPanel Pro MQTT integration with Home Assistant, I get many repeated warnings (nearly 2000 in two days ) in HA logs because some published payloads are partial.

Typical warnings:

  • Template variable warning: 'dict object' has no attribute 'proximity_detect'

  • same for screen_brightness, screen_state, illuminance, security_mode

  • Invalid event type ... for event.* when payload includes "event_type":""

Example payload seen on audio state topic:

{

“play_status”:“Stopped”,

“play_mode”:“Play once”,

“audio_address”:“http:///local/media/file.mp3”,

“event_type”:“”

}

Expected

  • No template warnings when optional keys are absent.

  • No invalid event warnings due to empty event_type.

Suggestion

  • In MQTT discovery templates, use safe defaults for optional keys (e.g. | default(...)).

  • Don’t publish empty event_type (omit it or send a valid value only when a real event exists).

This would greatly reduce HA log noise while keeping current functionality. Thank you

Sorry for the late reply. I have checked the relevant logs and confirmed that the issue you mentioned does exist. Thank you for pointing it out. We will fix these two warning messages in the next version. If you have any other questions, please feel free to contact me.