thermopro: add set_datetime button for TP358/TP393 (#36987)

* thermopro: add set_datetime service for TP358/TP393

* Switch from service docu to button

* Follow CodeRabbit recommendations

* incorporate review comments
This commit is contained in:
Stephan Jauernick 2025-02-23 16:31:36 +01:00 committed by GitHub
parent 84da6d3891
commit b22020a5bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,3 +31,31 @@ Integrates [ThermoPro](https://buythermopro.com/) devices into Home Assistant.
The ThermoPro integration will automatically discover devices once the [Bluetooth](/integrations/bluetooth) integration is enabled and functional.
{% include integrations/config_flow.md %}
## Buttons
These {% term actions %} allow one to set the time on supported devices (TP358, TP393) via Home Assistant.
### Button `Set Date&Time`
Sets the date & time on target devices to the system time in 24-hour notation.
The device is capable of showing 12-hour notation (AM/PM) but setting this is currently not implemented.
For example, the following automation sets the datetime of the thermometer each day.
{% raw %}
```yaml
mode: single
triggers:
- trigger: time
at: "03:03:03"
conditions: []
actions:
- action: button.press
target:
entity_id: button.tp_358_xxxx_your_device_set_date_time
data: {}
```
{% endraw %}