Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Mar 3, 2021
1 parent a1b5d6c commit fcbff9e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 31 deletions.
61 changes: 33 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
slider-entity-row
=================

[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/custom-components/hacs)
# slider-entity-row

Add a slider to rows in lovelace [entities](https://www.home-assistant.io/lovelace/entities/) cards.

For installation instructions [see this guide](https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins).
## Installing

Install `slider-entity-row.js` as a `module`.
[![hacs_badge](https://img.shields.io/badge/HACS-Default-orange.svg)](https://github.com/custom-components/hacs)

```yaml
resources:
- url: /local/slider-entity-row.js
type: module
```
Install using HACS or [see this guide](https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins).

## Usage
Add this to an entities card:
## Quick Start

Add this to an [entities](https://www.home-assistant.io/lovelace/entities/) card:

```yaml
type: entities
Expand All @@ -28,7 +22,9 @@ entities:
![slider-entity-row](https://user-images.githubusercontent.com/1299821/59467898-15b16600-8e31-11e9-9924-53b108572d3a.png)
Currenly supported entity domains:
## Usage
`entity` can be an entity in one of the following domains:

- `light` - set brightness
- `media_player` - set volume
Expand All @@ -37,22 +33,28 @@ Currenly supported entity domains:
- `fan` - set speed (assumes first setting is `off`)
- `input_number` - set value (only if `mode: slider`)
- `input_select` - select option
- `number` - set value

For `group`, use [light group](https://www.home-assistant.io/integrations/light.group/) or [cover group](https://www.home-assistant.io/integrations/cover.group/) instead.
If you want to controll more than one entity with the same slider, use [light group](https://www.home-assistant.io/integrations/light.group/), [cover group](https://www.home-assistant.io/integrations/cover.group/) or a custom made [template entity](https://www.home-assistant.io/integrations/#search/template).

![domains](https://user-images.githubusercontent.com/1299821/59467899-1813c000-8e31-11e9-8abd-34c887a7db2a.png)

### Options
Available options:

| Option | Values | Description | default |
| ------------ | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `min` | number | Minimum value of slider | |
| `max` | number | Maximum value of slider | |
| `step` | number | Step size of slider selection | |
| `toggle` | `true`/`false` | Show a toggle or mute button if possible | `false` |
| `hide_state` | `true`/`false` | `true`: Do not display the current state <br>`false`: Always display current state - even when the card is too narrow for it to be usable | none |
| `grow` | `true`/`false` | Make the slider as wide as possible (which is really just a little bit wider) | `false` |
| `full_row` | `true`/`false` | Hide the icon and name and stretch slider to full width | `false` |
| `attribute` | (see below) | Which attribute the slider should controll | |

![options](https://user-images.githubusercontent.com/1299821/59467902-19dd8380-8e31-11e9-9173-97c9b6be3179.png)

- `toggle: true` - Show a toggle instead of current state
- `hide_state: true` - Do not display current state
- `hide_state: false` - Always show the state, even when the card is too narrow
- `hide_when_off: true` - Hide the slider when state is `off`
- `full_row: true` - Hide icon and name and stretch slider to full width
- `min: <value>` - Set minimum value of slider
- `max: <value>` - Set maximum value of slider
- `step: <value>` - Set step size of slider
- `attribute: <value>` - Select which attribute the slider should control
<details><summary>YAML code for screenshot above</summary>

```yaml
type: entities
Expand Down Expand Up @@ -86,14 +88,16 @@ entities:
full_row: true
```

![options](https://user-images.githubusercontent.com/1299821/59467902-19dd8380-8e31-11e9-9173-97c9b6be3179.png)
</details>

### Attribute

#### Attributes
Currently, the following attribute settings are supported.

**For `light` domain:**

- `brightness` - default
- `brightness_pct` - default
- `brightness`
- `color_temp`
- `hue`
- `saturation`
Expand All @@ -109,4 +113,5 @@ Currently, the following attribute settings are supported.
- `tilt`

---

<a href="https://www.buymeacoffee.com/uqD6KHCdJ" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/white_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "slider-entity-row",
"private": true,
"version": "1.1.0b3",
"version": "1.1.0",
"description": "slider-entity-row =================",
"scripts": {
"build": "rollup -c",
Expand Down
Loading

0 comments on commit fcbff9e

Please sign in to comment.