8000 Request support for Skytower Grand Smart by pergolafabio · Pull Request #3366 · make-all/tuya-local · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Request support for Skytower Grand Smart #3366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 20, 2025
Merged

Conversation

pergolafabio
Copy link
Contributor

No description provided.

@pergolafabio
Copy link
Contributor Author

I added oscillating also as extra switch, I think everything works, don't thibk there is any diagnostic DP for errors or something, not sure

@make-all
Copy link
Owner

Why did you add it as an extra switch? You shouldn't do that.

@pergolafabio
Copy link
Contributor Author

It's easier in HA eventually to control it with a button card for example... Since oscillating is a complete different fan service... You need to set it to true/false instead of on/off

I could also make a template switch offcourse, but easier if the switch is coming from your integration

@make-all
Copy link
Owner

The integration should be about getting the data into HA, providing different options for ease of UI use is not something to aim for. Helpers can be used, or you can learn to use attributes in the UI cards. Exposing a switch entity does not even help with creating a button in the UI, as you still need to create a button that calls an action when pressed, and it isn't really any different if that action is switch.turn_on() or fan.oscillate(oscillating=True)

@pergolafabio
Copy link
Contributor Author

ok, makes sense!

i now have like:

              - type: custom:decluttering-card
                template: button
                variables:
                  - entity: switch.skytower_oscillating
                  - name: Draaien
                  - icon: arrow-oscillating
                  - label:
                  - spin: true              
                  - show_state: true
                  - margin-right: 40px

otherwise i have to use, something like below in the button card, but for some reason it didnt work, it turns it to off, but doesnt turn it on again :-)

              - tap_action:
                  action: call-service
                  service: fan.oscillate
                  data:
                    entity_id: fan.skytower
                    oscillating: |
                     [[[
                       return (states['fan.skytower'].attributes.oscillating=== 'true') ? 'false' : 'true';
                     ]]]

value: "8h"
- dps_val: "9H"
value: "9h"
# - entity: sensor
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally a select style timer will come with such a sensor, so I think it should be included. Often if the timer is not set, then the dp is not reported, so the dp should be marked as optional: true

@pergolafabio
Copy link
Contributor Author

ok, changed those 2

- filename: follow convention of brandname_modelname_type.yaml
- uncomment time_remaining sensor and add optional: true so it does not affect detection

PR make-all#3366
@pergolafabio
Copy link
Contributor Author

hey @make-all are you sure for that diagnostic one? i want able to find the correct dp 12 ?

{
  "result": {
    "model": "{\"modelId\":\"000004xfje\",\"services\":[{\"actions\":[],\"code\":\"\",\"description\":\"\",\"events\":[],\"name\":\"默认服务\",\"properties\":[
{\"abilityId\":1,\"accessMode\":\"rw\",\"code\":\"switch\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_power3\",\"attribute\":\"1\"},\"name\":\"开关\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":2,\"accessMode\":\"rw\",\"code\":\"fan_speed_enum\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-FanSpeed\"},\"name\":\"风速\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"low\",\"mid\",\"high\"]}},
{\"abilityId\":3,\"accessMode\":\"rw\",\"code\":\"fan_mode\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-a_function_eco\"},\"name\":\"模式\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"normal\",\"nature\",\"sleep\"]}},
{\"abilityId\":6,\"accessMode\":\"rw\",\"code\":\"fan_cool\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-a_mode_cool\"},\"name\":\"冷风\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":10,\"accessMode\":\"rw\",\"code\":\"switch_horizontal\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-a_function_hs\"},\"name\":\"左右摆风\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":11,\"accessMode\":\"rw\",\"code\":\"countdown_set\",\"description\":\"\",\"extensions\":{\"iconName\":\"icon-dp_time2\"},\"name\":\"定时关机\",\"typeSpec\":{\"type\":\"enum\",\"range\":[\"close\",\"1H\",\"2H\",\"3H\",\"4H\",\"5H\",\"6H\",\"7H\",\"8H\",\"9H\"]}},
{\"abilityId\":101,\"accessMode\":\"ro\",\"code\":\"Negative_ion\",\"description\":\"\",\"name\":\"负离子\",\"typeSpec\":{\"type\":\"bool\"}},
{\"abilityId\":102,\"accessMode\":\"ro\",\"code\":\"Air\",\"description\":\"\",\"name\":\"空气卫士\",\"typeSpec\":{\"type\":\"bool\"}}]}]}"
  },
  "success": true,
  "t": 1749819136712,
  "tid": "3c1c922d485511f0884d66005ac75605"
}

@make-all
Copy link
Owner

otherwise i have to use, something like below in the button card, but for some reason it didnt work, it turns it to off, but doesnt turn it on again :-)

              - tap_action:
                  action: call-service
                  service: fan.oscillate
                  data:
                    entity_id: fan.skytower
                    oscillating: |
                     [[[
                       return (states['fan.skytower'].attributes.oscillating=== 'true') ? 'false' : 'true';
                     ]]]

I would look at using is_state_attr('fan.skytower', 'oscillating', true) rather than trying to access the states directly. You should also be able to use the simpler not state_attr('fan.skytower', 'oscillating')

@make-all make-all merged commit 30e8754 into make-all:main Jun 20, 2025
4 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Tuya Local Jun 20, 2025
make-all added a commit that referenced this pull request Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

2 participants
0