Skip to content

Commit

Permalink
fix names and units
Browse files Browse the repository at this point in the history
  • Loading branch information
siku2 committed May 8, 2021
1 parent df28b94 commit 0ffe058
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion custom_components/weatherlink/air_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _aq_condition(self) -> AirQualityCondition:

@property
def name(self):
return self.coordinator.name
return self.coordinator.device_name

@property
def particulate_matter_2_5(self) -> float:
Expand Down
2 changes: 1 addition & 1 deletion custom_components/weatherlink/sensor_iss.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class SolarRad(
):
@property
def icon(self):
return "mdi:weather-balance-sunny"
return "mdi:white-balance-sunny"

@property
def state(self):
Expand Down
8 changes: 4 additions & 4 deletions custom_components/weatherlink/sensor_moisture.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ class SoilABC(MoistureSensor, abc=True):
def __init_subclass__(cls, *, sensor_id: int, **kwargs) -> None:
super().__init_subclass__(
sensor_name=f"Soil {sensor_id}",
unit_of_measurement="%",
device_class="humidity",
unit_of_measurement="cb",
device_class=None,
**kwargs,
)

Expand Down Expand Up @@ -137,8 +137,8 @@ class LeafABC(MoistureSensor, abc=True):
def __init_subclass__(cls, *, sensor_id: int, **kwargs) -> None:
super().__init_subclass__(
sensor_name=f"Leaf {sensor_id}",
unit_of_measurement="%",
device_class="humidity",
unit_of_measurement=None,
device_class=None,
**kwargs,
)

Expand Down
2 changes: 1 addition & 1 deletion custom_components/weatherlink/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _iss_condition(self) -> IssCondition:

@property
def name(self):
return self.coordinator.name
return self.coordinator.device_name

@property
def temperature(self):
Expand Down

0 comments on commit 0ffe058

Please sign in to comment.