Easy Sensor Creation
Create powerful sensors in Home Assistant – without a single line of code.
This integration is your shortcut to useful and intelligent sensors. If you're new to Home Assistant and don't want to write complex YAML files or templates, ESC is the perfect tool for you. It uses a simple, guided wizard in the UI to build everything from energy trackers to smart alarms.
ESC provides an intuitive, step-by-step menu interface for common sensor tasks that would otherwise require deep technical knowledge. All sensors are grouped under a single "ESC Easy Sensor Creation" device for easy management.
| Sensor Type | Description | Use Case |
|---|---|---|
| kWh Sensor | Converts a power sensor (W/kW) into an energy counter (kWh) using Riemann integration. Creates a native HA helper. | Track daily/monthly consumption in the Energy Dashboard (e.g., washing machine or solar panel). |
| Sum Sensor | Adds values from multiple sensors, with unit validation to prevent errors. | Total power draw from all lights in a room or combined temperature averages. |
| History Statistics | Calculates avg, min, or max from historical data (today, month, year) via Recorder. | Daily high/low temps, monthly energy peaks – no SQL needed. |
| Delta Sensor | Compares trends (e.g., today vs. yesterday mean) using HA's stats API. | Spot changes like "energy use up 20% this week" for alerts or dashboards. |
| Battery Charge/Discharge | Filters a power sensor for positive (charge) or negative (discharge) values, creates W sensor + kWh Riemann helper. | Solar charging (positive only) or EV battery drain (absolute negatives) for clean Energy Dashboard integration. |
| Binary Threshold | Triggers on/off based on a value crossing a threshold (e.g., >25°C). | Alarms like "overheat alert" or "low battery warning" with HA notifications. |
| Toggle Switch | Simple on/off control to pause or reset linked sensors. | Temporarily disable a sum sensor during maintenance or reset counters. |
Bonus: Optional device class assignment for proper icons/units, and all entities link to a central device for clutter-free organization.
The easiest way to install is via the Home Assistant Community Store (HACS).
- Open HACS and go to Integrations.
- Click the 3 dots in the top right corner and select Custom repositories.
- Add this repository's URL:
https://github.com/Zara-Toorox/ESC-Easy-Sensor-Creation - Select the category Integration.
- Search for "ESC Easy Sensor Creation" and click "Install".
- Restart Home Assistant when prompted.
Requirements: Recorder integration must be enabled (default in HA).
After installation, find ESC here: Settings > Devices & Services > Add Integration > ESC Easy Sensor Creation. Follow the wizard – it's self-explanatory with tooltips!
Turn a smart plug's power (W) into energy tracking (kWh):
- Start ESC and select "kWh Sensor".
- Pick your power sensor as "Source Sensor (W)".
- Name it (e.g., "Washing Machine kWh").
- Submit – it's now a native helper under Settings > Devices & Services > Helpers. Add to Energy Dashboard!
- Select "Sum".
- Choose multiple sensors (e.g., three lamps).
- Optionally classify as "Power" for Watt icon.
- Name it "Room Total Power".
- Done – real-time total in W!
- Select "History Statistics".
- Pick a single temp sensor.
- Choose "Average - Today".
- Name it "Daily Avg Temp".
- It polls Recorder data – value updates every minute.
- Select "Battery Charge/Discharge".
- Choose "Positive Values (Charge, e.g., PV/Solar)".
- Pick your inverter's power sensor.
- It creates a filtered W sensor + kWh helper – perfect for Energy Dashboard (ignores negatives).
- Select "Binary Threshold".
- Pick a temp sensor and set threshold (e.g., 25°C).
- Choose "On if > Threshold".
- Classify as "Heat" for icon.
- Name it "Overheat Alert" – use in automations for notifications!
- Added: Delta Sensor – Compares historical means (e.g., today vs. yesterday) with dynamic periods (hourly/daily stats) and graceful handling for missing data (shows "waiting for history" instead of 0).
- Added: Battery Charge/Discharge Sensor – Filters power values (positive for charge, absolute negatives for discharge), creates a dedicated W sensor + Riemann kWh helper for seamless Energy Dashboard use.
- Added: Binary Threshold Sensor – Event-driven on/off binary sensor for thresholds (e.g., alarm if temp > 25°C), with device class support for icons/alerts.
- Added: Toggle Switch – Virtual switch to pause/reset linked sensors, with optimistic updates and attribute syncing.
- Fixed: Unit loss in sensors – Added caching, source-based updates, and suggested units from device class (e.g., "°C" for temperature) for persistent display in UI/charts.
- Fixed: Delta sensor always showing 0 – Improved stats fetching with long-term fallback, debug logs, and None-state for no-data scenarios.
- Fixed: NameError in Battery flow – Imported missing constants (e.g., DEVICE_CLASS_POWER) and robustified config handling.
- Improved: Multilingual support – Full de.json and en.json for wizard steps, with consistent descriptions.
- Improved: Error resilience – More logs, extra attributes for status (e.g., "data_status: waiting_for_history"), and validation in flows.
- v5.0.x: Initial sum, stats, and kWh helpers with central device grouping.
Enjoy the integration! If you run into any problems or have feature requests, feel free to open an Issue on GitHub.
Version: 5.1.0-rc6
HACS: Search "ESC Easy Sensor Creation"
Docs & Screenshots: More coming soon – stay tuned!
Docs & Screenshots: More coming soon – stay tuned!
f3c27b1 (Add: CHANGELOG.md for HACS version notes)
