Skip to content

Commit

Permalink
Maybe fix #15 ?
Browse files Browse the repository at this point in the history
  • Loading branch information
Breina committed Apr 17, 2024
1 parent 471f2c0 commit 44aef40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/powertag_gateway/schneider_modbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class ProductType(enum.Enum):
A9MEM1580 = (121, 17980, "PowerTag F160")
A9XMWRD = (170, 9150, "PowerTag Link display")
SMT10020 = (171, 17350, "HeatTag sensor")
UNKNOWN = (0x8000, 0xFFFF, "Unknown or invalid")


class PowerFactorSignConvention(enum.Enum):
Expand Down Expand Up @@ -529,7 +530,7 @@ def tag_product_type(self, power_tag_index: int) -> ProductType | None:
"""Wireless device code type"""
if self.type_of_gateway == TypeOfGateway.SMARTLINK:
try:
identifier = self.__read_int_16(0x7930, power_tag_index)
identifier = self.__read_int_16(0x792F, power_tag_index)
if not identifier:
_LOGGER.error("The powertag returned an error while requesting its product type")
return None
Expand Down

0 comments on commit 44aef40

Please sign in to comment.