Custom UI with Buttons - Fan Control

If you never what the toggle - just remove the <ha-entity-toggle> element.

Thank you, Andrey, works like a charm now!

@morrelli43 Do you mind sharing the script behind your tv volume control?

Im trying to use your same custom card to control my tv to :slight_smile:

Sorry for the delay!

I have a harmony hub, so I just needed to pass through the command for the volume button to the hub.

This is all I had to do.

tvvolumeup:
  sequence:
    - service: remote.send_command
      entity_id: remote.harmony_hub
      data:
        device: "30557844"
        command: "VolumeUp"

I hope this helps you! :slight_smile:

Hello @JesseWebDotCom.

Could you please share your code for fan.
I was following guides in this thread and tried to build custom card for fan but can’t even make it appear.

This stopped working for me, so I stopped using it. I’m currently using this: https://community.home-assistant.io/t/custom-ui-tiles/

Hello,

I would like to be able to control le speed level of my dyson link fan with a slider on custom UI. And if possible to add a button for the oscillate.

I manged to make the sliders works for my light bulbs and to make the slider appaer next to the dyson fan like i did with the lights, but the fan slider is not working.

Do you have any suggestions?

My custom_glob:

fan.*:
  custom_ui_state_card: state-card-custom-ui
  state_card_mode: single-line
  slider_theme:
    min: 0
    max: 10
    pin: true
    off_when_min: true
    report_when_not_changed: false

Little help plz

still wing it here getting my head around it slowly I think

I put the
fan-model.html into the www folder
and the
state-card-with-speed.html into the www\custom_ui folder
state-card-custom_fan.html into the www\custom_ui folder

now the bit im lost in

I have this in my Fan.yaml

  - platform: mqtt
    name: "Hall Fan"
    state_topic: "home/Hall_fan/Switch"
    command_topic: "home/Hall_fan/cmd"
    payload_on:"DONT KNOW WHAT TO PUT HERE"
    payload_off:"DONT KNOW WHAT TO PUT HERE" 
    optimistic: false
    qos: 0
    retain: true

in my custom:

fan.hall_fan:
  icon: mdi:fan
  custom_ui_state_card: custom_fan

when I look in <>

I see

so that telling me HA is seeing it I Think

and in my group i have

  Hall:
    name: Hall Way
    entities:
      - switch.Hall_light
      - fan.hall_fan

Also in the Frontend I added this

frontend:
  themes: !include_dir_merge_named themes/
  extra_html_url:
    - /local/custom_ui/state-card-custom-ui.html
    - /local/custom_ui/state-card-with-speed.html
    - /local/custom_ui/state-card-custom_fan.html
  extra_html_url_es5:
    - /local/custom_ui/state-card-custom-ui-es5.html

it does not show :frowning:

what step did i miss

One error I see in your configuration is where you have:

fan.hall_fan:
  icon: mdi:fan
  custom_ui_state_card: custom_fan

That last line should be:

  custom_ui_state_card: state-card-custom_fan

…because it should match the name of the html file you have in the custom_ui folder.

1 Like

thanks ill have a look when home

hello @myle Hello, worked for you? what your HA version?
In my 0.53.1 not work

Sort of working Will update when it is

Hi!!
I just a newbie on making my room with HA and I really happy with all your help :slight_smile:

The Fan is the first one I connected to HA and remote it via boardlink.
I took 2 week to custom this Fan UI as @kylerw share in this topic and finally it work… However, when I click on Low/Med/High and I got the error

Unable to find service fan/set_speed
1:25 PM core.py (WARNING)

I know I miss something… please anyone help me with this :slight_smile:

Thanks for your help

hey buddy, is there a way to ‘intercept’ the speeds, and have them turn on a switch. not great on the code side.

i have fan power running through a z-wave in wall microcontroller
and the fan speeds i used this RF Ceiling Fan Remote Hack

so on off is one switch, and the speeds translate to turning on a different switch for each speed.

thanks in advance

I don’t think it would be a problem to update to support that setup - I’ve since stopped using this so I’m not sure I’m the best person to help. Sorry!

no worries, appreciate the response

very handy bit of code, thanks :smiley:
if i wanted to do the same for locks, i thought i could just look at states.lock
could I simply change all occurances of this:

{%-for state in states.binary_sensor 
      if(state.attributes.device_class=="motion" and state.state=="on")-%}

to this:

{%-for state in states.lock
      if(state.state=="unlocked")-%}

i thought it wasnt working, i had something else wrong…so this works for locks - VERY nicely (well with 2 doors unlocked, may run out of room with 3) - Thanks again for the code @jamesdawson3

 - platform: template
   sensors:
     locks_summary:
       value_template: >
         {%-for state in states.lock
           if(state.state=="unlocked")-%}
             {%-if loop.last-%}
               {%-if loop.index > 0-%}
                 {%-for state in states.lock if(state.state =="unlocked")-%}
                   {{state.name}}{%-if not loop.last -%}{%-if(loop.index+1==loop.length)%} & {%else%}, {%endif-%}{%-else%} Door Unlocked{%endif-%}
                 {%-endfor-%}
               {%-endif-%}
             {%-endif-%}
           {%-else-%}
             All Locked
         {%-endfor-%}
       icon_template: >
         {%-for state in states.lock
           if(state.state=="unlocked")-%}
             {%-if loop.last-%}
               {%-if loop.index > 0-%}
                   mdi:lock-open
               {%-endif-%}
             {%-endif-%}
           {%-else-%}
             mdi:lock
         {%-endfor-%}

Mind saying what you’re using in place of this? I’m looking to create something similar to what you did and am wondering if you found a “better” way

I’m using CustomUI but only to display the speed. I use Google Home to control the speed should I need to change it, generally. I can still open the detail modal for the Fan and adjust it there as well.

image

1 Like