mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Fixes (and stabilizes) some incorrect zone codes in RainMachine (#14719)
* Fixes (and stabilizes) some incorrect zone codes * Fixed a misspelling
This commit is contained in:
parent
7094d6d61e
commit
60f692c7bb
@ -83,7 +83,7 @@ SPRINKLER_TYPE_MAP = {
|
|||||||
1: 'Popup Spray',
|
1: 'Popup Spray',
|
||||||
2: 'Rotors',
|
2: 'Rotors',
|
||||||
3: 'Surface Drip',
|
3: 'Surface Drip',
|
||||||
4: 'Bubblers',
|
4: 'Bubblers Drip',
|
||||||
99: 'Other'
|
99: 'Other'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,14 +96,14 @@ SUN_EXPOSURE_MAP = {
|
|||||||
|
|
||||||
VEGETATION_MAP = {
|
VEGETATION_MAP = {
|
||||||
0: 'Not Set',
|
0: 'Not Set',
|
||||||
1: 'Not Set',
|
2: 'Cool Season Grass',
|
||||||
2: 'Grass',
|
|
||||||
3: 'Fruit Trees',
|
3: 'Fruit Trees',
|
||||||
4: 'Flowers',
|
4: 'Flowers',
|
||||||
5: 'Vegetables',
|
5: 'Vegetables',
|
||||||
6: 'Citrus',
|
6: 'Citrus',
|
||||||
7: 'Bushes',
|
7: 'Trees and Bushes',
|
||||||
8: 'Xeriscape',
|
9: 'Drought Tolerant Plants',
|
||||||
|
10: 'Warm Season Grass',
|
||||||
99: 'Other'
|
99: 'Other'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,15 +296,17 @@ class RainMachineZone(RainMachineSwitch):
|
|||||||
self._properties_json.get(
|
self._properties_json.get(
|
||||||
'waterSense').get('precipitationRate'),
|
'waterSense').get('precipitationRate'),
|
||||||
ATTR_RESTRICTIONS: self._obj.get('restriction'),
|
ATTR_RESTRICTIONS: self._obj.get('restriction'),
|
||||||
ATTR_SLOPE: SLOPE_TYPE_MAP[self._properties_json.get('slope')],
|
ATTR_SLOPE: SLOPE_TYPE_MAP.get(
|
||||||
|
self._properties_json.get('slope')),
|
||||||
ATTR_SOIL_TYPE:
|
ATTR_SOIL_TYPE:
|
||||||
SOIL_TYPE_MAP[self._properties_json.get('sun')],
|
SOIL_TYPE_MAP.get(self._properties_json.get('sun')),
|
||||||
ATTR_SPRINKLER_TYPE:
|
ATTR_SPRINKLER_TYPE:
|
||||||
SPRINKLER_TYPE_MAP[self._properties_json.get('group_id')],
|
SPRINKLER_TYPE_MAP.get(
|
||||||
|
self._properties_json.get('group_id')),
|
||||||
ATTR_SUN_EXPOSURE:
|
ATTR_SUN_EXPOSURE:
|
||||||
SUN_EXPOSURE_MAP[self._properties_json.get('sun')],
|
SUN_EXPOSURE_MAP.get(self._properties_json.get('sun')),
|
||||||
ATTR_VEGETATION_TYPE:
|
ATTR_VEGETATION_TYPE:
|
||||||
VEGETATION_MAP[self._obj.get('type')],
|
VEGETATION_MAP.get(self._obj.get('type')),
|
||||||
})
|
})
|
||||||
except RainMachineError as exc_info:
|
except RainMachineError as exc_info:
|
||||||
_LOGGER.error('Unable to update info for zone "%s"',
|
_LOGGER.error('Unable to update info for zone "%s"',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user