mirror of
https://github.com/home-assistant/android
synced 2024-10-01 13:53:53 +00:00
Support image entity in camera widget (now renamed picture widget) (#4159)
- Allow selecting image entities in the camera widget - Rename camera widget to picture widget to better reflect camera + image entity support
This commit is contained in:
parent
ef17312e70
commit
c6ddca8fdc
|
@ -47,7 +47,7 @@ import io.homeassistant.companion.android.widgets.template.TemplateWidgetConfigu
|
|||
|
||||
enum class WidgetType(val widgetIcon: IIcon) {
|
||||
BUTTON(CommunityMaterial.Icon2.cmd_gesture_tap),
|
||||
CAMERA(CommunityMaterial.Icon.cmd_camera),
|
||||
CAMERA(CommunityMaterial.Icon.cmd_camera_image),
|
||||
STATE(CommunityMaterial.Icon3.cmd_shape),
|
||||
MEDIA(CommunityMaterial.Icon3.cmd_play_box_multiple),
|
||||
TEMPLATE(CommunityMaterial.Icon.cmd_code_braces);
|
||||
|
|
|
@ -136,7 +136,7 @@ class CameraWidgetConfigureActivity : BaseWidgetConfigureActivity() {
|
|||
lifecycleScope.launch {
|
||||
try {
|
||||
val fetchedEntities = serverManager.integrationRepository(server.id).getEntities().orEmpty()
|
||||
.filter { it.domain == "camera" }
|
||||
.filter { it.domain == "camera" || it.domain == "image" }
|
||||
entities[server.id] = fetchedEntities
|
||||
if (server.id == selectedServerId) setAdapterEntities(server.id)
|
||||
} catch (e: Exception) {
|
||||
|
|
|
@ -132,8 +132,8 @@
|
|||
<string name="camera_tile_no_entity_yet">Edit the tile settings and select a camera to show</string>
|
||||
<string name="camera_tile_n">Camera tile #%d</string>
|
||||
<string name="camera_tiles">Camera tiles</string>
|
||||
<string name="camera_widgets">Camera widgets</string>
|
||||
<string name="camera_widget_desc">Displays the latest image from the camera</string>
|
||||
<string name="camera_widgets">Picture widgets</string>
|
||||
<string name="camera_widget_desc">Displays the latest picture from a camera or image entity</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="changelog">View full change log</string>
|
||||
<string name="checking_with_home_assistant">Checking with Home Assistant</string>
|
||||
|
@ -974,8 +974,8 @@
|
|||
<string name="widget_background_type_dynamiccolor">Dynamic color</string>
|
||||
<string name="widget_background_type_transparent">Transparent</string>
|
||||
<string name="widget_button_image_description">Service button</string>
|
||||
<string name="widget_camera_description">Camera widget</string>
|
||||
<string name="widget_camera_contentdescription">Camera image</string>
|
||||
<string name="widget_camera_description">Picture widget</string>
|
||||
<string name="widget_camera_contentdescription">Image</string>
|
||||
<string name="widget_config_service_error">A custom component is preventing service data from loading.</string>
|
||||
<string name="widget_creation_error">Unable to create widget.</string>
|
||||
<string name="widget_entity_fetch_error">Unable to fetch data for configured entity.</string>
|
||||
|
|
Loading…
Reference in a new issue