esphome / esphome/feature-requests

[DSMR] add field to sensor.py -> electricity_tariff

Open
#1,392 2 comments 1 reaction 0 assignees View on GitHub
component: dsmr
Dominant language
No language data
Stars
450
Forks
29
PR merge metrics
No merged PRs in 30d

Description

**Describe the problem you have/What new integration you would like**

I had some request from customers who would like to see a sensor for which tariff is used (high or low).

It is here defined in my old code:
https://github.com/zuidwijk/dsmr/blob/main/components/dsmr/fields.h#L228

But never put it to sensor.py as I didn't used it at that time.

It is not defined here:
https://github.com/esphome/esphome/blob/dev/esphome/components/dsmr/sensor.py

Please add this to sensor.py so customers can use it.

**Please describe your use case for this integration and alternatives you've tried:**

**Additional context**

It is field `0-0:96.14.0(0002)`

I assume that high tariff is 1 and low tariff is 2
It's a string with size 4 according to the specifications .

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in esphome/components/dsmr/sensor.py and compare its defined sensors with the referenced fields.h entry for 0-0:96.14.0(0002). Confirm the specification's tariff values and string representation before adding the sensor; done means the electricity_tariff field is exposed consistently with the existing DSMR sensors.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.