Skip to content

Commit

Permalink
fix mqtt test
Browse files Browse the repository at this point in the history
  • Loading branch information
jagheterfredrik committed Jul 25, 2024
1 parent 94326a8 commit 87eb521
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pymammotion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# TODO make a working device that will work outside HA too.
from pymammotion.mammotion.devices import MammotionBaseBLEDevice
from pymammotion.mqtt.mqtt import LubaMQTT, logger
from pymammotion.mqtt import MammotionMQTT

# TODO provide interface to pick between mqtt/cloud/bluetooth

Expand All @@ -28,7 +28,7 @@
CLIENT_ID = os.environ.get("CLIENT_ID")
IOT_TOKEN = os.environ.get("IOT_TOKEN")
REGION = os.environ.get("REGION")
luba = LubaMQTT(
luba = MammotionMQTT(
iot_token=IOT_TOKEN,
region_id=REGION,
product_key=PRODUCT_KEY,
Expand Down
4 changes: 2 additions & 2 deletions pymammotion/aliyun/dataclass/dev_by_account_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

@dataclass
class Device(DataClassORJSONMixin):
productModel: str
gmtModified: int
netType: str
nickName: str
categoryKey: str
productKey: str
nodeType: str
Expand All @@ -24,6 +22,8 @@ class Device(DataClassORJSONMixin):
identityId: str
thingType: str
status: int
nickName: Optional[str] = None
productModel: Optional[str] = None
productImage: Optional[str] = None
categoryImage: Optional[str] = None

Expand Down
2 changes: 1 addition & 1 deletion tests/login_and_mqtt_test.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pymammotion.aliyun.cloud_gateway import CloudIOTGateway
from pymammotion.const import MAMMOTION_DOMAIN
from pymammotion.mammotion.commands.mammotion_command import MammotionCommand
from pymammotion.mqtt.mammotion_mqtt import MammotionMQTT, logger
from pymammotion.mqtt import MammotionMQTT
from pymammotion.mammotion.devices.mammotion import MammotionBaseCloudDevice

logger = logging.getLogger(__name__)
Expand Down

0 comments on commit 87eb521

Please sign in to comment.