home-assistant / home-assistant/android

Device Controls - Temperature sensors support

Open
#5,680 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Kotlin
Stars
3.9k
Forks
1.1k
Avg merge
1d 12h
Merged PRs (30d)
81

Description

**Is your feature request related to a problem? Please describe.**

Adding Home Assistant to Device Controls with the built-in mode allows to use a wide range of entities from lights to automations, but temperature sensors are still missing.

**Describe the solution you'd like**

Add support to temperature sensors through the built-in mode for Device Controls, the [`ControlTemplate.getNoTemplateObject()`](https://developer.android.com/reference/android/service/controls/templates/ControlTemplate#getNoTemplateObject()) template should work, since it's supposed to be used when "the application might use this to convey information about the control, but the user can't interact with it", as said in the [Device Controls documentation](https://developer.android.com/develop/ui/views/device-control).

**Describe alternatives you've considered, if any**

If there are issues with `ControlTemplate.getNoTemplateObject()`, a workaround could be using the [`TemperatureControlTemplate`](https://developer.android.com/reference/android/service/controls/templates/TemperatureControlTemplate) while waiting for a better solution.

**Additional context**

I'm currently using the dashboard mode as a workaround, it works okay, but a webview will obviously never be as quick to load as native controls.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.