Skip to content

Instantly share code, notes, and snippets.

View knthm's full-sized avatar

Kenneth J. Miller knthm

View GitHub Profile
@knthm
knthm / template_sensor_shenzhen_neo_nas_wr01ze_energy.yaml
Last active October 4, 2025 21:46
Home Assistant Template Sensor - Shenzhen Neo NAS-WR01ZE Reported kWh Energy Correction
# In addition to random most significant bit flips in the 32-bit energy consumption value reported
# which results in massive negative values, the NAS-WR01ZE also generally computes the energy consumed incorrectly.
# In brief practical tests the actual consumption is actually ~1/4 of the value reported.
#
# This template sensor corrects both these firmware bugs.
#
template:
sensor:
- name: "My Device Power Electric Consumption kWh Corrected"
# Set unique_id to a 32-digit random number or UUID