to clarify, do you have something that’s working and you’re looking to optimize (your last statement makes it sound like that) or are you not able to figure it out at all?
if you’ve got something that’s close, post what you have. easier for us to mod what you’ve got.
Hi again. Yes, I have individual scripts that accomplish what I need. I’d just like to make it pretty.
To summarize, I have a fan that can only be integrated into HA via a Smartthings integration. Speeds are not directly supported. It will function as a switch and turn on/off, but that is it, using the Smartthings integration.
In order to set speeds, I can either:
Run an imported scene created first within Smartthings.
Use an Alexa Media Player HACS integration to send a voice command directly to an Alexa device as if you’re speaking to it. The fan has Alexa integration that works well and allows % speed commands.
The graphic in the initial post suggested one could run 3 different scenes/scripts with the 3 icons to the right. It was taken from my thread here:
Currently, I have just this:
type: entities
entities:
- entity: switch.fan_fan_switch
name: Fan switch
icon: mdi:ceiling-fan
- entity: script.set_fan_60
name: Fan speed 60%
- entity: script.set_fan_65
icon: mdi:fan
name: Fan speed 65%
- entity: script.set_fan_68
name: Fan speed 68%
- entity: script.set_fan_70
name: Fan speed 70%
Each speed script looks like this:
service: media_player.play_media
target:
entity_id: media_player.myname_s_echo_dot
data:
media_content_type: custom
media_content_id: set fan speed to 60
So it all functions. But it is a blocky chunk of text + buttons I’d like to condense somehow.
entities:
- entity: switch.fan_fan_switch
name: Fan switch
icon: mdi:ceiling-fan
tap_action:
action: call-service
service: media_player.play_media
target:
entity_id: media_player.myname_s_echo_dot
data:
media_content_type: custom
media_content_id: set fan speed to 60
a different way would be to use tap_action have it call your script (instead of media_player.play_media) and pass it the speed.
this doesn’t necessarily shrink the lines of code in your entities card, but it does nuke the need to have 4 different scripts doing nearly the same thing.
I was able to condense my many presets into this glance card with tap_action on each icon, which I find much more usable:
Still not sure what kind of card the other user was using to create that initial icon layout, but at least I am on the right path with card constructions!