The value_attribute of the selector options doesn’t matter when it comes to which option is selected. You probably need to change the selector overall value_attribute to a template and include logic there to change it based on fan information. Something like:
{{ "preset_mode" if state_attr("fan.sunroom_air_purifier", "preset_mode") != None else "state" }}
And then change the option of your second selection button to “on”.
thank you. As i still not sure 100% how this is working but it is working fine now for the auto mode. I tink i also need to update the template for the 100%speped. Could you help here aswell?
What’s the preset mode of your fan when it’s set to 100%? If it’s not null it may make more sense to use preset mode as the selector value attribute and set it’s options based on that.
so let me give you more information about the 3 selections:
Auto Mode → State is on and the attribute preset_mode is auto and the attrribute percentage is null
100% → State is on and the attribute preset_mode is null and the attribute percentage is 100
Off → State is off and the attribute prese_mode is null and the percentage is 0
I currently have this “card” in a stack in card and have this in individual buttons and conditions. Maybe it is also easier to do this the the custom features?
The template I provided works for me. Here is the updated config for reference. Did you remember to change the 100% button option to “on”? If you don’t want anything to be highlighted when percentage is not 0 or 100 we can also modify the templates and options to use percentage as the value attribute when not in auto preset mode.
The entire object isn’t templatable, the individual child fields are. Try moving the template to the perform_action field (your elif case is incorrect and should be switch.turn_off) and the target and action fields out of the template like so.
I just want to thank you Nerwyn for keeping custom integration community alive and sharing these amazing projects with us. I use your universal remote card all the time!
Hi Im new here but is there any way to remove the “main unit” of the tile I have two cases where it is kind of messing with my spacing. I can make it invisible but there is still the gap where it is supposed to be but im not able to change the rows and and over all size of the tile. Since I am unable to work around the problem, can I perhaps make some kind of tile without an enity and just a feature row with a custom function?
Sorry if the solution is obvious
Im having a similar issue requiring manipulating the VALUE itself. I want to use a sensor with MM:SS format and would need to format the value to seconds so the slider can change position accordingly. Change the range is not working for that. Thank you
The slider requires a numerical value to track and modify. I do not want to make it so that the value of a custom feature can be further modified from a state or attribute as it would only be applicable for niche use cases or doable via helper entities instead. You could create a template sensor which converts the original sensor from MM:SS to just seconds, and then use that with the slider.
You’re missing a colon in your CSS on --feature-height. --feature-button-spacing isn’t a variable used by this project. You can set the gap on the custom selector host styles instead. You also don’t need to use !important in these styles, it’s added by the feature to custom user styles. It’s also flex-basis, not flexbasis.
Try these styles. You’ll have to adjust the custom-feature-button attributes to fit the options as you like. You may also have to adjust the parent card layout to fit the extra tall feature row if in sections view.
Are you putting these styles at the row level or the selector level? They should be in the selector. And are you trying to add a gap between selector options (what my provided styles do), or increase the side margins of the entire selector?
How can I reduce the gap between the icon and the label below?
To do that, you’ll have to modify the label styles of each option individually. Add this to the CSS Styles field in the appearance panel of each individual option.
.label {
position: relative;
top: -16px;
}
also, any idea how to remove the header/title above the selector options (this is a tile card). thx for the help, this is just what I need!
Outside of the scope of what custom features can do, but you can do this with card-mod.
huge thank you! Its a big challenge for a noobie when we literally need to learn 3 ‘new’ languages (YAML, JINJA, CSS) all at once to be proficient with dashboards and automations.
one last question… do you know the setting that will get rid of the buffer at the bottom? padding-bottom:10px !important; didnt work.
If you’re using sections view, in the layout tab of the card click on the menu and then Edit in YAML, and then set rows to a non-number like null or x. That should disable it from conforming to sections rows which should get rid of the extra tile card space.