liaan / broadlink_ac_mqtt

Broadlink Air Conditioners to mqtt
MIT License
101 stars 44 forks source link

Feature Request: Control of the Vertical and or Horizontal "Fixation" #84

Closed LordDethman closed 1 year ago

LordDethman commented 3 years ago

Is there any chance of adding control of the vertical / horizontal articulation? My units can only do the vertical and if I turn the unit off with broadlink_ac_mqtt, when I turn it back on the "fixation" is off. I have to use the hand remote to turn it back on.

Also my unit does also have an "Auto" Heating / Cooling mode. Any chance of getting that option?

liaan commented 3 years ago

hi

The script can already do it via the mqtt commands fixation_v or fixation_h with values as per below.. If you want to have it in HA, I can try and add it, just dont' have HA installed anywhere so will be a while.

class FIXATION:
                        class VERTICAL:
                                #STOP= 0b00000000
                                TOP= 0b00000001
                                MIDDLE1= 0b00000010
                                MIDDLE2 = 0b00000011
                                MIDDLE3 = 0b00000100
                                BOTTOM= 0b00000101
                                SWING= 0b00000110
                                AUTO = 0b00000111

                        class HORIZONTAL:               ##Don't think this really works for all devices.
                                LEFT_FIX = 2
                                LEFT_FLAP = 1
                                LEFT_RIGHT_FIX = 7
                                LEFT_RIGHT_FLAP = 0
                                RIGHT_FIX = 6
                                RIGHT_FLAP = 5
                                ON = 0
                                OFF = 1
LordDethman commented 3 years ago

Nice, OK I will give it a try.

If I understand correctly I would need to add this to the device array in the ASToMqtt.py file ,"fixation_v":["swing","auto","stop"] ?

And would I need to uncomment the #STOP= 0b00000000 in the ac_db.py?

If you dont have time I can play with it myself. Not like I cant change it back myself if I mess it up.

Thanks for giving the time, I know you are a busy person.

liaan commented 3 years ago

Nice, OK I will give it a try.

If I understand correctly I would need to add this to the device array in the ASToMqtt.py file ,"fixation_v":["swing","auto","stop"] ?

And would I need to uncomment the #STOP= 0b00000000 in the ac_db.py?

If you dont have time I can play with it myself. Not like I cant change it back myself if I mess it up.

Thanks for giving the time, I know you are a busy person.

umm... not sure about the comment out of the STOP , but you can try

my testing using the AC freedom app years ago was it was either auto, or one of the other positions.. one could not stop it randomly .. might have changed

I would guess in your case Auto might be better option than stop.

LordDethman commented 3 years ago

10/4 So I will give it a try. Does ,"fixation_v",["auto","swing"] seem right for the device array? Sorry Python is not my strong suit. I can pluck my way through it but a bit slow. I am much more confident with a few proprietary control programming languages lol.

LordDethman commented 3 years ago

ok I got it to read the fixation_v without any real issues. The payload was different on my unit for the "swing" setting but I was able to fix that in the classes. But I seem to be missing something to be able to command it.

Do i need to create a def set_fixation_v somewhere? I see a def set_ for just about everything expect for fixation.

liaan commented 3 years ago

10/4 So I will give it a try. Does ,"fixation_v",["auto","swing"] seem right for the device array? Sorry Python is not my strong suit. I can pluck my way through it but a bit slow. I am much more confident with a few proprietary control programming languages lol.

haha... i hate python, with a passion.
Basicly it monitors the mqtt for new messages. then check the topic when new message arrives, This will be the "function". The value of the topic will what todo with the "function" (command)

So if you look in actomqtt.py .. line ~300 .. it checkes what is received on the mqtt "function" and very lazy "if" tree to go through the options.

So you will need to do somethign like'

if function ==  "fixation_v":   
            try:
                if self.device_objects.get(address):
                    status = self.device_objects[address].set_fixationv(value)

                    if status :
                        self.publish_mqtt_info(status)
                else:
                    logger.debug("Device not on list of devices %s, type:%s" % (address,type(address)))
                    return
            except Exception as e:  
                logger.critical(e)
                return

And then in ac_db.py add set_fixation_v

def set_fixationv(self,fixation_text):
        ##Make sure latest info as cannot just update one things, have set all
        self.get_ac_states()

        fixation = self.STATIC.FIXATION.VERTICAL.__dict__.get(fixation_text.upper())
        if fixation != None:
            self.status['fixation_v'] = mode
            self.set_ac_status()
            return self.make_nice_status(self.status)
        else:
            self.logger.debug("Not found mode value %s" , str(mode_text))
            return False

not sure if you noticed you can run monitor.py -d and will write huge amount of debugging info

so if you want to see the changes that you make using your remote, that might help as well, just check the values comming through there or subscribe to the mqtt topic

hope that gives you some direction

If you get it to work , do a pull request .. or dump the code here, so can maybe add it for other ?

LordDethman commented 3 years ago

10/4 So I will give it a try. Does ,"fixation_v",["auto","swing"] seem right for the device array? Sorry Python is not my strong suit. I can pluck my way through it but a bit slow. I am much more confident with a few proprietary control programming languages lol.

haha... i hate python, with a passion. Basicly it monitors the mqtt for new messages. then check the topic when new message arrives, This will be the "function". The value of the topic will what todo with the "function" (command)

So if you look in actomqtt.py .. line ~300 .. it checkes what is received on the mqtt "function" and very lazy "if" tree to go through the options.

So you will need to do somethign like'

if function ==  "fixation_v": 
          try:
              if self.device_objects.get(address):
                  status = self.device_objects[address].set_fixationv(value)

                  if status :
                      self.publish_mqtt_info(status)
              else:
                  logger.debug("Device not on list of devices %s, type:%s" % (address,type(address)))
                  return
          except Exception as e:  
              logger.critical(e)
              return

And then in ac_db.py add set_fixation_v

def set_fixationv(self,fixation_text):
      ##Make sure latest info as cannot just update one things, have set all
      self.get_ac_states()

      fixation = self.STATIC.FIXATION.VERTICAL.__dict__.get(fixation_text.upper())
      if fixation != None:
          self.status['fixation_v'] = mode
          self.set_ac_status()
          return self.make_nice_status(self.status)
      else:
          self.logger.debug("Not found mode value %s" , str(mode_text))
          return False

not sure if you noticed you can run monitor.py -d and will write huge amount of debugging info

so if you want to see the changes that you make using your remote, that might help as well, just check the values comming through there or subscribe to the mqtt topic

hope that gives you some direction

If you get it to work , do a pull request .. or dump the code here, so can maybe add it for other ?

Thank you, I will see if I can make this work for me.

fmobile999 commented 3 years ago

Hi! What about vertical / horizontal fixation use? Is this code working?

andremain commented 3 years ago

I really need this to be able to use this integration. Too bad the guy didn't even comment if he made it or not.

liaan commented 3 years ago

I really need this to be able to use this integration. Too bad the guy didn't even comment if he made it or not.

Why you not just copy paste the code above and see if it works?

andremain commented 3 years ago

OK @liaan , can i have some help with trying to do this as i am not a programmer?

So First things first this is my edit to the AcToMqtt.py File

I made a fork of your GitHub page. Please check my indentations. I have added the class at line 26 and the function at line 472.

https://github.com/andremain/broadlink_ac_mqtt/blob/master/AcToMqtt.py%20with%20V%20Swing%20(Fixation)

When i try to run monitor.py it gives me an error:

File "/home/pi/broadlink_ac_mqtt/broadlink_ac_mqtt/AcToMqtt.py", line 487 return SyntaxError: 'return' outside function

I don't understand why this is outside the function or where it should be.

Also here is the second piece of code:

https://github.com/andremain/broadlink_ac_mqtt/blob/master/ac_db.py%20with%20V%20Swing%20(Fixation)

The extra piece of code is at line 26

I also made a guide to help out others https://community.home-assistant.io/t/broadlink-ac-integration-aux-dunham-rcool-akai-rinnai-kenwood-tornado-ballu/342789

Can you please help me?

LordDethman commented 3 years ago

Yeah I have not had a chance to update and test this one. I have been very busy at work. If I have a weekend without a kids birthday party or a wedding I will try and test this on my setup.

liaan commented 3 years ago

sorry, also swamped.. its crazy session at "work" so not even had change to read anything on here

as soos as things are bit quiter will have looksee.

andremain commented 3 years ago

Thank you very much guys! Appreciate it! Both of you. If you can get the swing working for me then it is GO otherwise it's a deal breaker. And trust me this is a lot better than making IR command batches for the AC units.

liaan commented 3 years ago

This was my first "major" "script" in Python .. I had todo ALOT of reading and hours of debugging and .. If I could figure python out, sure you can 2 ;-)

I tried to comment the script as much as possible.. so it should make half sense.

if you have questions.. I can easily asnwer when having brake, its just difficult to sit down and spin up my python development setup to get this tested. I don't do any python coding except for this script, so its always mission to get things going to do any new dev.

andremain commented 3 years ago

i am really useless when it comes to coding. I have been struggling with this for 3 days and no go...

liaan commented 3 years ago

haha.. put the code in.. start monitor.py -d and check the logs

Does it start, or do you get errors?

if starts .. what command do you sent to mqtt to test the verticals?

andremain commented 3 years ago

Apologies, I did not see your comment Liaan.

I have already tried. Here is the error i get:

When i try to run monitor.py it gives me an error:

File "/home/pi/broadlink_ac_mqtt/broadlink_ac_mqtt/AcToMqtt.py", line 487 return SyntaxError: 'return' outside function

I don't understand why this is outside the function or where it should be.

Here are both the modified files i made. What do you think?

https://github.com/andremain/broadlink_ac_mqtt/blob/master/ac_db.py%20with%20V%20Swing%20(Fixation)

The extra piece of code is at line 26

I also made a guide to help out others https://community.home-assistant.io/t/broadlink-ac-integration-aux-dunham-rcool-akai-rinnai-kenwood-tornado-ballu/342789

liaan commented 3 years ago

ok, feeling guilty.. busy seting up dev enviroment, will try get this sorted today

liaan commented 3 years ago

Is there any chance of adding control of the vertical / horizontal articulation? My units can only do the vertical and if I turn the unit off with broadlink_ac_mqtt, when I turn it back on the "fixation" is off. I have to use the hand remote to turn it back on.

Also my unit does also have an "Auto" Heating / Cooling mode. Any chance of getting that option?

The auto mode for heating cooling is Mqtt command MODE: AUTO .. so just send that in MQTT mosquitto_pub -h mqtt.internall -t '/aircon/mac_address/mode/set' -m 'AUTO' class MODE: COOLING = 0b00000001 DRY = 0b00000010 HEATING = 0b00000100 AUTO = 0b00000000 FAN = 0b00000110

Added the verticals / horizontal mqtt command: Horizontal mosquitto_pub -h mqtt.internall -t '/aircon/mac_address/fixation_h/set' -m 'RIGHT' Veritcal mosquitto_pub -h mqtt.internall -t '/aircon/mac_address/fixation_v/set' -m 'SWING'

Here list of options for vertical and horizontal commands


class VERTICAL:

                TOP= 0b00000001
                MIDDLE1= 0b00000010
                MIDDLE2 = 0b00000011
                MIDDLE3 = 0b00000100
                BOTTOM= 0b00000101
                SWING= 0b00000110
                AUTO = 0b00000111

class HORIZONTAL:       ##Don't think this really works for all devices. .. Mine only support ON OFF
                LEFT_FIX = 2
                LEFT_FLAP = 1
                LEFT_RIGHT_FIX = 7
                LEFT_RIGHT_FLAP = 0
                RIGHT_FIX = 6
                RIGHT_FLAP = 5
                ON = 0
                OFF = 1
liaan commented 3 years ago

If you need this in HA .. then please send me the HA mqtt autoconfig setup so I can add it.

andremain commented 3 years ago

If you need this in HA .. then please send me the HA mqtt autoconfig setup so I can add it.

Thank you so much @liaan. Do i need to reinstall the program on my linux server?

I am sorry i am not sure what you mean by mqtt autonfig.

is it this thing?

logins: [] customize: active: false folder: mosquitto certfile: fullchain.pem keyfile: privkey.pem require_certificate: false

Or this: ?

climate:

andremain commented 3 years ago

class VERTICAL:

          TOP= 0b00000001
          MIDDLE1= 0b00000010
          MIDDLE2 = 0b00000011
          MIDDLE3 = 0b00000100
          BOTTOM= 0b00000101
          SWING= 0b00000110
          AUTO = 0b00000111

class HORIZONTAL: ##Don't think this really works for all devices. .. Mine only support ON OFF LEFT_FIX = 2 LEFT_FLAP = 1 LEFT_RIGHT_FIX = 7 LEFT_RIGHT_FLAP = 0 RIGHT_FIX = 6 RIGHT_FLAP = 5 ON = 0 OFF = 1

Where do i need to add this?

liaan commented 3 years ago

class VERTICAL:

        TOP= 0b00000001
        MIDDLE1= 0b00000010
        MIDDLE2 = 0b00000011
        MIDDLE3 = 0b00000100
        BOTTOM= 0b00000101
        SWING= 0b00000110
        AUTO = 0b00000111

class HORIZONTAL: ##Don't think this really works for all devices. .. Mine only support ON OFF LEFT_FIX = 2 LEFT_FLAP = 1 LEFT_RIGHT_FIX = 7 LEFT_RIGHT_FLAP = 0 RIGHT_FIX = 6 RIGHT_FLAP = 5 ON = 0 OFF = 1

Where do i need to add this?

Hi,

Nowhere .. those are the support values for the mqtt command to set the fixations.

IE: mosquitto_pub -h mqtt.internall -t '/aircon/mac_address/fixation_h/set' -m 'RIGHT'

andremain commented 3 years ago

Nowhere .. those are the support values for the mqtt command to set the fixations.

IE: mosquitto_pub -h mqtt.internall -t '/aircon/mac_address/fixation_h/set' -m 'RIGHT'

Don't i need to do any changes to the broadlink_ac_mqtt program i donwloaded to my linux machine?

andremain commented 3 years ago

It works! A million thanks @liaan !!! Just remove the old code and redownload the new one. Setup the config file again and paste this to your configuration.yaml file in home assistant changing the mac address

climate:
- action_topic: /aircon/c8f742348bec/homeassistant/set
  availability_topic: /aircon/LWT
  current_temperature_topic: /aircon/c8f742348bec/ambient_temp/value
  fan_mode_command_topic: /aircon/c8f742348bec/fanspeed_homeassistant/set
  fan_mode_state_topic: /aircon/c8f742348bec/fanspeed_homeassistant/value
  fan_modes:
  - Auto
  - Low
  - Medium
  - High
  - Turbo
  - Mute
  max_temp: 32.0
  min_temp: 16.0
  mode_command_topic: /aircon/c8f742348bec/mode_homeassistant/set
  mode_state_topic: /aircon/c8f742348bec/mode_homeassistant/value
  modes:
  - 'off'
  - cool
  - heat
  - fan_only
  - dry
  name: 'Living Room AC'
  platform: mqtt
  precision: 0.5
  temp_step: 0.5
  temperature_command_topic: /aircon/c8f742348bec/temp/set
  temperature_state_topic: /aircon/c8f742348bec/temp/value
  unique_id: c8f742348bec
  swing_mode_command_topic: /aircon/c8f742348bec/fixation_v/set
  swing_mode_state_topic: /aircon/c8f742348bec/fixation_v/value
  swing_modes:
  - SWING
  - TOP
  - AUTO
  - MIDDLE1
  - MIDDLE2
  - MIDDLE3
andremain commented 3 years ago

Is there any way to set the swing & Fan Speed in HA automations? I can only set the HVAC modes.

yoedf commented 2 years ago

Hi @liaan, i created PR to add this to the auto discovery by HA (tested with my HA) https://github.com/liaan/broadlink_ac_mqtt/pull/92

liaan commented 2 years ago

Thanks Will have to check the other merge request for same function as well .. just have not had time to spend don the project lately.. hopefully will have gap next week

From: yoedf @.> Sent: Thursday, 20 January 2022 16:23 To: liaan/broadlink_ac_mqtt @.> Cc: Karman de Lange @.>; Mention @.> Subject: Re: [liaan/broadlink_ac_mqtt] Feature Request: Control of the Vertical and or Horizontal "Fixation" (#84)

Hi @liaanhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fliaan&data=04%7C01%7C%7Cc1a5c7e91f3743a5703308d9dc205b48%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637782853795002478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fLbDp93tNvSH6H4GLAUVBBLS3xQ8RnVwmPCr1aDIiL0%3D&reserved=0, i created PR to add this to the auto discovery by HA (tested with my HA)

92https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fliaan%2Fbroadlink_ac_mqtt%2Fpull%2F92&data=04%7C01%7C%7Cc1a5c7e91f3743a5703308d9dc205b48%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637782853795002478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=b1uCwsGS3Wzg9%2Fpsia8Ou99tqM35szqNenJtr5kXaUE%3D&reserved=0

- Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fliaan%2Fbroadlink_ac_mqtt%2Fissues%2F84%23issuecomment-1017555487&data=04%7C01%7C%7Cc1a5c7e91f3743a5703308d9dc205b48%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637782853795002478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=R39R%2B1Ry4Jy6EjUKX0hTIWt0jMqybB9mmquhSh6Ct%2FQ%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAGTCXYD5ALYO4DY6HJD4V3UXALEBANCNFSM5A3ECSCA&data=04%7C01%7C%7Cc1a5c7e91f3743a5703308d9dc205b48%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637782853795002478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=CWuCLx2h8MYyZ4fHQlvqkNpk3GbhuOZjgF4ymYUmAQg%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cc1a5c7e91f3743a5703308d9dc205b48%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637782853795002478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=%2BoZ62x65vo3HA%2BHc26s6GHe7Ouyxj2t3zXLjWuVD0vs%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cc1a5c7e91f3743a5703308d9dc205b48%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637782853795002478%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=4EDP6mDeIEShVJPiru5JjyGFucbqBQvp7Ek97YV0sfk%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>

yoedf commented 2 years ago

Hi @liaan do you think you will be able to merge my PR soon (https://github.com/liaan/broadlink_ac_mqtt/pull/92)?

yoed-fried-deel commented 2 years ago

Hi @liaan, any estimation when you will be able to merge this change?

liaan commented 2 years ago

appologies, i've not looked at github in months, never saw emails, weird

its merged now. will do build as well

andremain commented 2 years ago

Hi Liaan. Thank you btw i have been using it for quite some time now and it works well! Even the fixation part you added. Is there a way we can add this to HACS directly to HA? The only issue i have is that it keeps loosing the connection and i have to restart it.

liaan commented 2 years ago

Hi Liaan. Thank you btw i have been using it for quite some time now and it works well! Even the fixation part you added. Is there a way we can add this to HACS directly to HA? The only issue i have is that it keeps loosing the connection and i have to restart it.

Someone did port the code to plugin for HA (well, few years ago, not sure if maintained still)

Which part you need to restart? cause it should not "loose" connection as the mqtt should reconnect whole time.

only other thing is maybe reduce the poll interval to the AC? sometimes the AC's cannot handle to many queries.

andremain commented 2 years ago

Really do you remember the name of the integration by any chance?

The service does not stop but sometimes when i restart HA or update it i have to manually stop and restart the service.

liaan commented 2 years ago

Really do you remember the name of the integration by any chance?

The service does not stop but sometimes when i restart HA or update it i have to manually stop and restart the service.

there setting for persistance or someting for HA that should fix that.. let me try find config, been to long

liaan commented 2 years ago

auto_discovery_topic_retain: False

if that is False, set it to True, should fix the HA remembering device

andremain commented 2 years ago

is this meant for inside HA or the broadlink ac mqtt?

liaan commented 2 years ago

is this meant for inside HA or the broadlink ac mqtt?

its in the config file, where you set the mqtt server etc.

mqtt:
    host: mqtt
    port: 1883
    client_id: ac_to_mqtt
    user: koos
    passwd: koos_se_password
    topic_prefix: /aircon
    auto_discovery_topic: homeassistant
    auto_discovery_topic_retain: true
    discovery: False
andremain commented 2 years ago

Ok thank you. It was set to: auto_discovery_topic_retain: False. I assume the True should be a capital T?

liaan commented 2 years ago

Ok thank you. It was set to: auto_discovery_topic_retain: False. I assume the True should be a capital T?

actually, I don't think it matters.. you can try it

what it does it makes the MQTT topic message as persistant, so each time the HA reconnect to the MQTT it gets the HA config message again and again

advokatden commented 2 years ago

Good afternoon!I get the following error when I turn on SWING mode:

Logger: homeassistant.components.mqtt.climate Source: components/mqtt/climate.py:628 Integration: MQTT (documentation, issues) First occurred: 16:54:33 (26 occurrences) Last logged: 16:59:00

Invalid swing_modes mode: 0

Data from mqtt explorer:

Снимок экрана 2022-06-12 в 17 11 29

advokatden commented 2 years ago

Добрый день!Я получаю следующую ошибку, когда включаю режим КАЧАНИЯ:

Регистратор: homeassistant.components.mqtt.climate Источник: components/mqtt/climate.py: 628 Интеграция: MQTT (документация, проблемы) Первое появление: 16:54:33 (26 случаев) Последнее появление: 16:59:00

Недопустимый режим swing_modes: 0

Данные из mqtt explorer:

Снимок экрана 2022-06-12 в 17 11 29

Fixed the config ac_db.py . It helped

liaan commented 2 years ago

hi

Sorry, but I don't have HA installed anywhere at moment, so cannot test any integrations.....

You say you got it fixed, what did you change so I can update code?

advokatden commented 2 years ago

92

good day!

Fixed SWING mode = 0

class STATIC:

Static stuff

    class FIXATION:
        class VERTICAL:
            #STOP= 0b00000000
            TOP= 0b00000001
            MIDDLE1= 0b00000010
            MIDDLE2 = 0b00000011
            MIDDLE3 = 0b00000100
            BOTTOM= 0b00000101
            #SWING= 0b00000110
                             **SWING = 0**
            AUTO = 0b00000111
advokatden commented 2 years ago

привет

Извините, но на данный момент у меня нигде не установлен HA, поэтому я не могу протестировать какие-либо интеграции.....

Вы говорите, что исправили это, что вы изменили, чтобы я мог обновить код?

I wanted to say a big thank you for your work!!

liaan commented 2 years ago

92

good day!

Fixed SWING mode = 0

class STATIC: ##Static stuff class FIXATION: class VERTICAL: #STOP= 0b00000000 TOP= 0b00000001 MIDDLE1= 0b00000010 MIDDLE2 = 0b00000011 MIDDLE3 = 0b00000100 BOTTOM= 0b00000101 #SWING= 0b00000110 SWING = 0 AUTO = 0b00000111

thanks.. w