Comments (9)
@mattieha these examples really should be in the readme
from slider-button-card.
When the component is installed, it ships with a (not working because lacking of entity_id) example. It is:
type: custom:slider-button-card
entity: '<put here your entity_id>'
slider:
percentage: true
direction: left-right
background: gradient
use_state_color: false
use_percentage_bg_opacity: false
show_track: false
force_square: false
show_name: true
show_state: true
icon:
show: true
use_state_color: true
rotate: false
tap_action:
action: more-info
action_button:
mode: toggle
icon: mdi:power
show: true
show_spinner: true
tap_action:
action: toggle
from slider-button-card.
When the component is installed, it ships with a (not working because lacking of entity_id) example. It is:
Thank you!
I can't change icon to another one. This construction don't work:
- type: custom:slider-button-card
entity: light.light_room_lamp
icon: mdi:floor-light
use_state_color: true
name: Лампа
And this too:
icon:
show: true
use_state_color: true
rotate: false
tap_action:
action: more-info
action_button:
mode: toggle
icon: floor-light
show: true
show_spinner: true
tap_action:
action: toggle
from slider-button-card.
You need to pay attention to the expected values.
Your first example is not supplying an object as expected, you're supplying a string.
Your second example is supplying the toggle object properly, but the icon string is missing "mdi:"
Use the UI card tool to get a feeling for what the values should be, or read through the docs, and you'll have a much better time with this.
from slider-button-card.
Thank you!
Looks like I don't understand expected values :(
Your second example is supplying the toggle object properly, but the icon string is missing "mdi:"
Oops. So, I use it with mdi and also nothing new.
Copy paste from example:
- type: custom:slider-button-card
entity: light.light_hall_l1
name: Коридор
icon:
show: true
use_state_color: true
rotate: false
tap_action:
action: more-info
action_button:
mode: toggle
icon: mdi:power
show: true
show_spinner: true
tap_action:
action: toggle
give me this with default icon
from slider-button-card.
Mode should be custom in that example, sorry was on mobile and missed it. Toggle overrides pretty much everything else for the action button.
from slider-button-card.
Mode should be custom in that example, sorry was on mobile and missed it. Toggle overrides pretty much everything else for the action button.
Yes, it work!
action_button:
mode: custom
icon: mdi:power
Anyway, looks like there is a lot of code for only icon change. What code will be enough for slider with default options and only new icon?
from slider-button-card.
Experiments give me this:
- type: custom:slider-button-card
entity: light.light_room_lamp
name: Лампа
icon:
show: true
use_state_color: true
icon: mdi:floor-lamp-dual
action_button:
mode: custom
icon: mdi:power
show_spinner: true
tap_action:
action: toggle
from slider-button-card.
@johntdyer I've added yaml examples to the readme, please let me know if you're missing a certain example.
from slider-button-card.
Related Issues (20)
- Action call service: input_boolean:toogle doesn’t work HOT 3
- Color Control Button
- Light Color Slider
- Slider breaks/blocks scrolling on touchscreens HOT 2
- Triangle slider smoothed edges
- State color bleeding over corners no matter the radius HOT 1
- slider option min value. HOT 1
- Problem with slider in covercard HOT 8
- Use templating within a call-service action to dynamically set service_data based on state HOT 1
- Vertical Slider not working on Touchscreen
- Use of Polymer
- State not displaying in 2023.4.6
- Input_number?
- dotted line
- Potential opacitiy issue when using Kibibit Theme
- State is not appearing on the card
- input_number in v1.12.0 is not working HOT 1
- Support setting tilt position for covers HOT 1
- for input_boolean entities slider selects only natural numbers
- Edit margin of the name
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slider-button-card.