Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: thomasloven/lovelace-slider-entity-row
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 10
Choose a base ref
...
head repository: thomasloven/lovelace-slider-entity-row
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jan 18, 2020

  1. Fix #91. Fix hide full row.

    thomasloven committed Jan 18, 2020
    Copy the full SHA
    51d6893 View commit details
  2. Fix #90

    thomasloven committed Jan 18, 2020
    Copy the full SHA
    998a9a3 View commit details

Commits on Apr 14, 2020

  1. Copy the full SHA
    0a420fe View commit details

Commits on May 13, 2020

  1. Tweak state hiding width

    thomasloven committed May 13, 2020
    Copy the full SHA
    62d192e View commit details
  2. Copy the full SHA
    202d2b5 View commit details
  3. Fix github issue template

    thomasloven committed May 13, 2020
    Copy the full SHA
    f215ab6 View commit details
  4. Copy the full SHA
    0b396b1 View commit details
  5. Copy the full SHA
    80a81c3 View commit details

Commits on May 22, 2020

  1. Adjust flex grow. Fix #123

    thomasloven committed May 22, 2020
    Copy the full SHA
    2efcc53 View commit details

Commits on May 28, 2020

  1. Copy the full SHA
    3dfaa1a View commit details

Commits on Jun 30, 2020

  1. Copy the full SHA
    5026d7d View commit details

Commits on Oct 9, 2020

  1. Capitalize "Unavailable"

    KTibow authored and thomasloven committed Oct 9, 2020
    Copy the full SHA
    2c841fa View commit details
  2. Use language default for unavailable

    KTibow authored and thomasloven committed Oct 9, 2020
    Copy the full SHA
    4b746ec View commit details
  3. Update main.js

    KTibow authored and thomasloven committed Oct 9, 2020
    Copy the full SHA
    a0748e1 View commit details

Commits on Feb 15, 2021

  1. Update readme

    thomasloven committed Feb 15, 2021
    Copy the full SHA
    d4bfcd2 View commit details

Commits on Mar 3, 2021

  1. Show toggle switches for unavailable entities. Fixes #130

    This fixes #130 by showing a toggle switch when `toggle` is enabled even if the entity is unavailable.
    DerEnderKeks authored and thomasloven committed Mar 3, 2021
    Copy the full SHA
    f0fc848 View commit details
  2. Add devcontainer

    thomasloven committed Mar 3, 2021
    Copy the full SHA
    697264c View commit details
  3. Jump to typescript

    thomasloven committed Mar 3, 2021
    Copy the full SHA
    de0d204 View commit details
  4. Copy the full SHA
    05aa15d View commit details
  5. Copy the full SHA
    80b6194 View commit details
  6. Copy the full SHA
    26a2c8e View commit details
  7. Copy the full SHA
    a1b5d6c View commit details
  8. Update readme

    thomasloven committed Mar 3, 2021
    Copy the full SHA
    fcbff9e View commit details
  9. Fix translations. Fix #138

    thomasloven committed Mar 3, 2021
    Copy the full SHA
    0e8a6a9 View commit details

Commits on Mar 4, 2021

  1. Bump version number

    thomasloven committed Mar 4, 2021
    Copy the full SHA
    d2ce226 View commit details

Commits on Mar 13, 2021

  1. Fix #176

    thomasloven committed Mar 13, 2021
    Copy the full SHA
    f7f63ec View commit details
  2. Fix #175

    thomasloven committed Mar 13, 2021
    Copy the full SHA
    3865b00 View commit details

Commits on Jun 3, 2021

  1. fix typo

    RubenKelevra authored and thomasloven committed Jun 3, 2021
    Copy the full SHA
    c823837 View commit details

Commits on Jun 4, 2021

  1. Copy the full SHA
    4117e1a View commit details
  2. Bump minor version

    thomasloven committed Jun 4, 2021
    Copy the full SHA
    1283b5a View commit details

Commits on Jul 10, 2021

  1. Update readme

    thomasloven committed Jul 10, 2021
    Copy the full SHA
    99126b3 View commit details

Commits on Jul 25, 2021

  1. Copy the full SHA
    c227e5a View commit details

Commits on Oct 30, 2021

  1. fix icons not showing in new frontend version (#220)

    Co-authored-by: Thomas Lovén <thomasloven@gmail.com>
    regevbr and thomasloven authored Oct 30, 2021
    Copy the full SHA
    6984ef2 View commit details
  2. Additional space for Value needed if step < 1 (#216)

    Co-authored-by: Thomas Lovén <thomasloven@gmail.com>
    Breaveheard and thomasloven authored Oct 30, 2021
    Copy the full SHA
    4906d9b View commit details
  3. Make --paper-slider-secondary-color: transparent to prevent it showin…

    …g when slider is set to a negative number (#204)
    sprocket-9 authored Oct 30, 2021
    Copy the full SHA
    684bee6 View commit details
  4. Allow switching ltr/rtl

    thomasloven committed Oct 30, 2021
    Copy the full SHA
    10bf0bf View commit details
  5. Copy the full SHA
    fbe9b46 View commit details
  6. Fix #151

    thomasloven committed Oct 30, 2021
    Copy the full SHA
    e2b5e24 View commit details
  7. Fix #181

    thomasloven committed Oct 30, 2021
    Copy the full SHA
    011523f View commit details
  8. Fix #208

    thomasloven committed Oct 30, 2021
    Copy the full SHA
    cb4a170 View commit details
  9. Copy the full SHA
    c714b1e View commit details
  10. Copy the full SHA
    491460e View commit details
  11. Fix #210

    thomasloven committed Oct 30, 2021
    Copy the full SHA
    df3a687 View commit details
  12. Update dependencies

    thomasloven committed Oct 30, 2021
    Copy the full SHA
    ce3ee39 View commit details

Commits on Oct 31, 2021

  1. Fix #223

    thomasloven committed Oct 31, 2021
    Copy the full SHA
    3587bef View commit details

Commits on Jun 13, 2022

  1. Update HACS URL (#252)

    wrt54g authored Jun 13, 2022
    Copy the full SHA
    c84a0ad View commit details

Commits on Dec 26, 2022

  1. Update to lit 2.0

    thomasloven committed Dec 26, 2022
    Copy the full SHA
    1e39d67 View commit details
  2. Fix #262

    thomasloven committed Dec 26, 2022
    Copy the full SHA
    bc03d50 View commit details
  3. Copy the full SHA
    c9cb302 View commit details
  4. Copy the full SHA
    4ea3965 View commit details
Showing with 4,321 additions and 4,051 deletions.
  1. +35 −0 .devcontainer/devcontainer.json
  2. +1 −0 .gitattributes
  3. +9 −22 .github/ISSUE_TEMPLATE/bug-report.md
  4. +4 −0 .github/issue_label_bot.yaml
  5. +7 −0 .github/pull_request_template.md
  6. +2 −0 .vscode/settings.json
  7. +32 −0 .vscode/tasks.json
  8. +45 −27 README.md
  9. +2,451 −3,472 package-lock.json
  10. +16 −7 package.json
  11. +22 −0 rollup.config.js
  12. +1 −55 slider-entity-row.js
  13. +0 −59 src/controller.js
  14. +2 −5 src/{climate-controller.js → controllers/climate-controller.ts}
  15. +94 −0 src/controllers/controller.ts
  16. +37 −14 src/{cover-controller.js → controllers/cover-controller.ts}
  17. +42 −0 src/controllers/fan-controller.ts
  18. +29 −0 src/controllers/get-controller.ts
  19. +32 −0 src/controllers/humidifier-controller.ts
  20. +4 −4 src/{input-number-controller.js → controllers/input-number-controller.ts}
  21. +6 −3 src/{input-select-controller.js → controllers/input-select-controller.ts}
  22. +343 −0 src/controllers/light-controller.ts
  23. +63 −0 src/controllers/media-player-controller.ts
  24. +44 −0 src/controllers/number-controller.ts
  25. +80 −0 src/controllers/timer-controller.ts
  26. +32 −0 src/controllers/water-heater-controller.ts
  27. +113 −0 src/editor.ts
  28. +0 −43 src/fan-controller.js
  29. +0 −174 src/light-controller.js
  30. +0 −122 src/main.js
  31. +210 −0 src/main.ts
  32. +0 −34 src/media-player-controller.js
  33. +4 −0 test/.env
  34. +26 −0 test/configuration.yaml
  35. +16 −0 test/docker-compose.yml
  36. +9 −0 test/lovelace.yaml
  37. +69 −0 test/views/1_types.yaml
  38. +193 −0 test/views/2_options.yaml
  39. +157 −0 test/views/3_attributes.yaml
  40. +60 −0 test/views/4_width.yaml
  41. +22 −0 test/views/5_errors.yaml
  42. +9 −0 tsconfig.json
  43. +0 −10 webpack.config.js
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "Slider-entity-row Dev",
"image": "thomasloven/hass-custom-devcontainer",
"postCreateCommand": "sudo -E container setup-dev && npm add",
"containerEnv": {
"DEVCONTAINER": "1"
},
"forwardPorts": [8123],
"mounts": [
"source=${localWorkspaceFolder},target=/config/www/workspace,type=bind",
"source=${localWorkspaceFolder}/test,target=/config/test,type=bind",
"source=${localWorkspaceFolder}/test/configuration.yaml,target=/config/configuration.yaml,type=bind"
],
"runArgs": ["--env-file", "${localWorkspaceFolder}/test/.env"],
"extensions": [
"github.vscode-pull-request-github",
"esbenp.prettier-vscode",
"spmeesseman.vscode-taskexplorer"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 2,
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.trimTrailingWhitespace": true
}
}

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
slider-entity-row.js binary
package-lock.json binary
31 changes: 9 additions & 22 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,36 @@
---
name: Bug report
about: For reporting bugs or unexpected behavior
title: ''
labels: ''
assignees: ''
title: ""
labels: ""
assignees: ""
---

My Home Assistant version: 0.XX.X

My Home Assistant version: 0.XXX.X

My lovelace configuration method (GUI or yaml):


What I am doing:


What I expected to happen:


What happened instead:


**Minimal** steps to reproduce:


```yaml
# The least ammount of code possible to reproduce my error



# End of code
```


Error messages from the browser console:


---

**By putting an X in the boxes ([ ]) below, I indicate that I:**

[ ] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

[ ] Have made sure I am using the latest version of the plugin.

[ ] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
**By putting an X in the boxes ([X]) below, I indicate that I:**

[ ] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
- [] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
- [] Have made sure I am using the latest version of the plugin.
- [] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
- [] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
4 changes: 4 additions & 0 deletions .github/issue_label_bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
label-alias:
bug: 'bug'
feature_request: 'enhancement'
question: 'should-be-on-forums'
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--
Please do not include compiled distribution files in the PR (i.e. slider-entity-row.js).
I like to be able to know exactly what goes into those.
/ Thomas
-->
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
32 changes: 32 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "npm: build",
"type": "npm",
"script": "build",
"problemMatcher": []
},
{
"label": "npm: watch",
"type": "npm",
"script": "watch",
"problemMatcher": [],
"presentation": {
"panel": "shared",
"group": "test"
}
},
{
"label": "Run hass",
"type": "shell",
"command": "sudo container launch",
"problemMatcher": [],
"presentation": {
"panel": "shared",
"group": "test"
}
}
]
}

72 changes: 45 additions & 27 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/hacs/integration)

```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
@@ -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
@@ -37,19 +33,35 @@ 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
- `timer` - set number of seconds remaining

If you want to control 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 |
| `hide_when_off` | `true`/`false` | `true`: Hide slider when state is off <br>`false`: Always display slider | `false` |
| `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` |
| `show_icon` | `true`/`false` | Show an icon when `full_row` is true. This icon is NOT clickable | `false` |
| `attribute` | (see below) | Which attribute the slider should control | |
| `colorize` | `true`/`false` | Colorize the bar (only for some attributes) | `false` |
| `dir` | `ltr`/`rtl` | Use this to override your languages Right-To-Left or Left-To-Right setting | language |

Most general Entities row options like `name`, `icon` and `tap_action` et.al. are also supported.

![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_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
@@ -83,27 +95,33 @@ 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`
- `color_temp_mired`
- `hue`
- `saturation`
- `red`
- `green`
- `blue`
- `effect`
- `white_value`
- `white` - for RGBW lights only
- `cold_white` - for RGBWW lights only
- `warm_white` - for RGBWW lights only

**For `cover` domain:**

- `position` - default
- `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>
Loading