NAS杂记2--HomeAssistant笔记--更换iOS Themes主题

主题链接:
https://github.com/basnijholt/lovelace-ios-themes

配置过程

  1. 主题需要在HACS中安装,搜索iOS应该就能看到

  2. 配置中加入:

    1
    2
    3
    4
    5
    6
    文件名: /config/configuration.yaml

    # Load frontend themes from the themes folder
    frontend:
    themes: !include_dir_merge_named themes

  3. 把主题放置在themes下
    themes文件夹在docker中HA的根目录下

  4. 建www目录存放图片资源

    注意:www文件夹与themes文件夹同一层级

    在www目录中建立跟themes目录中一样的文件夹名称,例如这里叫做ios-themes

  5. 在www的插件文件夹中,修改ios-themes.yaml

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11

    主要是这边的修改
    把www改为local, 路径更改

    background-image: "center / cover no-repeat fixed url('/hacsfiles/themes/homekit-bg-dark-green.jp
    g')"

    改成

    background-image: "center / cover no-repeat fixed url('/local/ios-themes/homeki
    t-bg-dark-green.jpg')"

    local文件夹其实就是值得www文件夹(注意不是把www文件夹改名成local文件夹)

    如果不改的话,系统会找不到这个图片,导致首页不会修改背景图

  6. 重启HA