esphome / esphome/feature-requests

Add Datetime Sensor Component

Open
#3,196 2 comments 4 reactions 0 assignees View on GitHub
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**
ESPHome currently provides no datetime sensor component and a corresponding template component. A datetime sensor component could be used to send date and datetimes to Home Assistant where they could then be used in automations.
In Home Assistant this would be represented by a sensor with a `datetime` value.

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

Home Assistant sensors can have `str`, `int`, `float`, `date`, `datetime` and `Decimal` values.
`str` values are provided by the ESPHome text sensor component. `float` values are provided by the sensor component. For most usecases `int` and `decimal` also be represented by sensor components, however there is currently no ESPHome component to represent `data` and `datetime` valued sensors.

ESPHome does have a datetime compoment, however that corresponds to a Home Assistant Datetime Entity, not a Sensor with `datetime` value. The difference is that a Datetime Entity can be set by the user while a sensor only provides values to the user.

**Additional context**

Home Assistant Sensor documentatoin: https://developers.home-assistant.io/docs/core/entity/sensor
ESPHome Datetime compoment: https://esphome.io/components/datetime/

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.