对于hass的默认主题,不是很喜欢,于是去社区找了几套基dark mode的主题,这里分享给大家。
切换方法:
1、configuration.yaml文件中的frontend 修改为
# Enables the frontend
frontend:
themes: !include_dir_merge_named themes/
2、在根目录下面新建themes 文件夹
3、input_select 添加
current_theme:
name: 更换主题
options:
- default
- dark_theme
- Night
- solarized
- PmxMononight
initial: solarized
icon: mdi:palette
4、automation 添加
- id: change_current_theme
alias: 'change_theme'
#initial_state: 'on'
trigger:
- platform: state
entity_id: input_select.current_theme
- platform: homeassistant
event: start
action:
- service: frontend.set_theme
data_template:
name: '{{states.input_select.current_theme.state}}'
|