Code Monkey home page Code Monkey logo

home-assistant-customizer's Introduction

Home-assistant customizer comonent

Custom component for home-assistant

  • Optionally loads CustomUI files. [HA 0.53+]
  • Specify a list of attributes to hide from more-info window.
  • Hide CustomUI - related attributes in more-info window. [HA 0.53+]
  • Add services for dynamic customization.
  • Set the width and number of UI columns (Requires CustomUI 20180112+)

Installing

Put customizer dir in <ha_config_dir>/custom_components/

Using

configuration.yaml options (all optional):

attribute type description
custom_ui [HA 0.53+] local / hosted / debug
version_tag
Whether to fetch CustomUI files.
local loads it from <config_dir>/www/custom_ui/state-card-custom-ui.html.
hosted loads it from https://raw.githubusercontent.com/andrey-git/home-assistant-custom-ui/master/state-card-custom-ui.html
debug loads it from https://raw.githubusercontent.com/andrey-git/home-assistant-custom-ui/master/state-card-custom-ui-dbg.html
version_tag (for example 20170830) loads a tagged version from 'https://github.com/andrey-git/home-assistant-custom-ui/releases/download/20170830/state-card-custom-ui.html'
hide_attributes List of strings List of attributes to hide from more-info popups. (Requires CustomUI)
columns List of integers Pixel widths at which to add the next column. Default value is [300, 600, 900, 1200]

Example HA 0.53:

customizer:
  custom_ui: local
  hide_attributes:
    - node_id
    - value_index
  columns: [350, 700, 1050, 1400, 1850, 2100]

Services

The component exposes a set_attribute service. It sets (or clears) persistent attribute of an entity overriding any value set in code. Like specifying it in homeassistant -> customize YAML section.

Note that calling homeassistant.reload_core_config service or changing customization via Config panel will reset overrides to their yaml state.

Service fields:

name description example
entity_id Entity ID to set the attribute on light.patio
attribute Name of the attribute to set friendly_name
value (Optional) Value to set. Leave unspecified in order to clear set value. Note that when clearing attribute it will be empty (and not set-by-code) until next entity update My light'

For example you can call:

customizer.set_attribute({"entity_id": "light.patio", "attribute": "friendly_name", "value": "My Light"}) to change the light name

home-assistant-customizer's People

Contributors

andrey-git avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.