How to convert entity attributes value into separated entity & put to device control page?

Hi, i have a wifi ceiling fan which have the below control

image

From the developer tools, I can see that the fan.master_fan have the below attibutes

I just want to add 2 extra control which is “direction” & “percentage” into the device controls page (is that possible or just a separate entity will do)

current valid state for direction & percentage as below

state for “direction” can be “forward” & “reverse”
state for “percentage” can be “10”, “20”, “30”,“40”,“50”,“60”,“70”,“80”,“90”,“100”

is that possible using helper to add that additional control?
Just want add the “direction” attributes as a switch & be able to control it, left position as reverse, right position as forward.

For the “percentage” attributes, might need a menu to select which number.

image

What are the two entities that are not shown? Could they be the ones you want? Otherwise, attributes are read-only from the device - changing them will have no impact. What is the integration used with the fan?

@michaelblight is not the entities I want as shown below

image

Anyhow I have done the fan direction switch by using toggle helper & is working as intended(the code as below). I also create the sensor that can show current status of fan direction & fan speed as show.

trigger:
  - platform: state
    entity_id: input_boolean.master_fan_direction_switch
condition: []
action:
  - data:
      direction: >-
        {{ 'forward' if is_state('input_boolean.master_fan_direction_switch',
        'on') else 'reverse' }}
    target:
      entity_id: fan.master_fan
    action: fan.set_direction

image

now I still figure up how to made the speed control work as I already create it using dropdown helpers as well.

By the way, the integration that I use is EchonetLite from HACS. The Fan actually is Panasonic DC fan with 10 speed & light temperature adjustable.

I just done settle the fan speed automation ! Since I using the “input_select.master_fan_speed_control” entity as my fan speed control

trigger:
  - platform: state
    entity_id:
      - input_select.master_fan_speed_control
condition: []
action:
  - service: fan.set_percentage
    data:
      percentage: "{{ states('input_select.master_fan_speed_control') | int * 10 }}"
    target:
      entity_id: fan.master_fan

here is the final product
image

BTW, you can also use Device Tools to merge your new entities into the device:

1 Like

Thank you for the info, will check on it.