Picture Entity 카드
이미지 형태로 엔티티를 표시합니다. URL의 이미지 대신 camera
엔티티 그림을 표시할 수도 있습니다 .
엔터티 상태에 따라 배경이 변경됩니다.
Configuration Variables
- type
(string)(Required)
picture-entity
- entity
(string)(Required)
entity_id
는 그림으로 사용됨.- camera_image
(string)(Optional)
사용할 카메라
entity_id
(만일 이미entity
가 카메라 엔티티일 경우 필요 없음).- camera_view
-
(string)(Optional)
만일
stream
이 활성화된 경우 live는 라이브 뷰를 표시합니다.Default value:
auto
- image
(string)(Optional)
이미지의 URL.
- state_image
(map)(Optional)
엔티티 상태를 이미지에 매핑 (
state: image URL
, 아래 예제 참조).- state_filter
(map)(Optional)
- aspect_ratio
(string)(Optional)
이미지의 높이를 너비의 비율로 만듭니다. 다음과 같은 값을 입력할 수 있습니다:
16x9
,16:9
,1.78
.- name
(string)(Optional)
엔터티 이름을 덮어씁니다.
- show_name
-
(boolean)(Optional)
바닥글에 이름을 표시.
Default value:
true
- show_state
-
(boolean)(Optional)
바닥글에 상태를 표시.
Default value:
true
- theme
(string)(Optional)
내 테마로 설정
themes.yaml
- tap_action
(map)(Optional)
탭할 때 액션
- action
-
(string)(Required)
액션 수행 (
more-info
,toggle
,call-service
,navigate
,url
,none
)Default value:
more-info
- navigation_path
-
(string)(Optional)
action
이navigate
로 정의된 경우 탐색할 경로 (예:/lovelace/0/
)Default value:
none
- url_path
-
(string)(Optional)
action
이url
로 정의된 경우 (예:https://www.home-assistant.io
Default value:
none
- service
-
(string)(Optional)
action
이call-service
로 정의된 경우 호출할 서비스 (예:media_player.media_play_pause
)Default value:
none
- service_data
-
(string)(Optional)
action
이call-service
로 정의된 경우 포함할 서비스 데이터 (예:entity_id: media_player.bedroom
)Default value:
none
- confirmation
-
(boolean | map)(Optional)
작업을 컨펌하는 확인 대화 상자를 표시. 아래
confirmation
개체 참조Default value:
false
- hold_action
(map)(Optional)
길게 누를 때 액션
- action
-
(string)(Required)
액션 수행 (
more-info
,toggle
,call-service
,navigate
,url
,none
)Default value:
more-info
- navigation_path
-
(string)(Optional)
action
이navigate
로 정의된 경우 탐색 할 경로 (예:/lovelace/0/
)Default value:
none
- url_path
-
(string)(Optional)
action
이url
로 정의된 경우 (예:https://www.home-assistant.io
)Default value:
none
- service
-
(string)(Optional)
action
이call-service
로 정의된 경우 호출할 서비스 (예:media_player.media_play_pause
)Default value:
none
- service_data
-
(string)(Optional)
action
이call-service
로 정의된 경우 포함할 서비스 데이터 (예:entity_id: media_player.bedroom
)Default value:
none
- confirmation
-
(boolean | map)(Optional)
작업을 컨펌하는 확인 대화 상자를 표시. 아래
confirmation
개체 참조Default value:
false
- double_tap_action
(map)(Optional)
더블탭 할때 액션
- action
-
(string)(Required)
액션 수행 (
more-info
,toggle
,call-service
,navigate
,url
,none
)Default value:
more-info
- navigation_path
-
(string)(Optional)
action
이navigate
로 정의된 경우 탐색할 경로 (예:/lovelace/0/
)Default value:
none
- url_path
-
(string)(Optional)
action
이url
로 정의된 경우 (예:https://www.home-assistant.io
)Default value:
none
- service
-
(string)(Optional)
action
이call-service
로 정의된 경우 호출할 서비스 (예:media_player.media_play_pause
)Default value:
none
- service_data
-
(string)(Optional)
action
이call-service
로 정의된 경우 포함할 서비스 데이터 (예:entity_id: media_player.bedroom
)Default value:
none
- confirmation
-
(boolean | map)(Optional)
작업을 컨펌하는 확인 대화 상자를 표시. 아래
confirmation
개체 참조Default value:
false
Confirmation 옵션
boolean 대신 객체로 확인을 정의하면 더 많은 사용자 정의와 설정을 추가할 수 있습니다. :
Exemptions 옵션
state_filter 사용법
다른 CSS filters 지정.
state_filter:
"on": brightness(110%) saturate(1.2)
"off": brightness(50%) hue-rotate(45deg)
사례
기본 사례 :
type: picture-entity
entity: light.bed_light
image: /local/bed_light.png
각 상태에 따른 다른 이미지 사례 :
type: picture-entity
entity: light.bed_light
state_image:
"on": /local/bed_light_on.png
"off": /local/bed_light_off.png
FFMPEG 카메라에 실시간 피드 표시 :
type: picture-entity
entity: camera.backdoor
camera_view: live
tap_action:
action: call-service
service: camera.snapshot
service_data:
entity_id: camera.backdoor
filename: '/shared/backdoor-{{ now().strftime("%Y-%m-%d-%H%M%S") }}.jpg'
파일 이름은 시스템의 Home Assistant에서 쓸 수 있는 경로여야합니다. whitelist_external_dirs
(documentation)를 설정할 필요가 있을 수 있습니다.