Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-73 committed Aug 11, 2019
2 parents 8050519 + c90cc7d commit c4239b4
Show file tree
Hide file tree
Showing 15 changed files with 62 additions and 17 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.6 2019-08-11
Tested with Hassio 0.97.1 and Bosch Indego 1000

### Breaking changes

### Changes
- Added sensor **Indego State Detailed**
- Modified sensor **Indego Mower State** to have 5 states:
- Docked
- Mowing
- Diagnostic mode
- End of life
- Software update
- Stuck
- Better handling of API calls (in case of unknown response)

## 0.5 2019-08-11
Tested with Hassio 0.96.5 and 0.97.1 and Bosch Indego 1000

Expand Down
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,30 +30,31 @@ indego_id: 123456789
### Entities
All sensors are auto discovered and should appear as "unused entities" after adding the component. List of available sensor entities:
|Sensor | Description |
|------------------------|--------------------------------------------------|
|Indego mower state | Current state |
|Indego lawn mowed | Current percentage of the lawn that is mowed |
|Indego mowing mode | The mowing mode set |
|Indego runtime total | Sum the total runtime of the mover |
|Indego alerts | Number of alerts |
|Indego battery % | Battery percentage (experimental) |
|Indego battery V | Battery voltageNumber (experimental) |
|Sensor | Description |
|--------------------------|--------------------------------------------------|
|Indego mower state | Current state |
|Indego lawn mowed | Current percentage of the lawn that is mowed |
|Indego mowing mode | The mowing mode set |
|Indego runtime total | Sum the total runtime of the mover |
|Indego alerts | Number of alerts |
|Indego battery % | Battery percentage (experimental) |
|Indego battery V | Battery voltageNumber (experimental) |
|Indego mower state detail | Current state in detail |
**mover state** has properties for model name, serial and firmware.
**Indego mover state** has properties for model name, serial and firmware.
![State Detail](/doc/2-Indego_State_details.png)
![Mower State](/doc/2-Indego_mower_state.png)
**lawn moved** has properties for session total, mowing and charging time.
**Indego lawn moved** has properties for session total, mowing and charging time.
![Lawn Mowed](/doc/3-Indego_Lawn_mowed.png)
![Lawn Mowed](/doc/3-Indego_lawn_mowed2.png)
**Indego runtime total** has properties for total, mowig and charging time.
![Runtime Total](/doc/4-Indego_Runtime_detail.png)
![Runtime Total](/doc/4-Indego_runtime_total.png)
**Indego battery %** has properties for percentage, voltage, cycles, discharge and temperature.
![Battery sensor](/doc/5-Indego_Battery_Sensor.png)
![Battery sensor](/doc/5-Indego_battery.png)
### Service
There are a service exposed to HA called **indego.mower_command**. It sends a specified command to the mower. Accepted commands are:
Expand All @@ -65,6 +66,7 @@ There are a service exposed to HA called **indego.mower_command**. It sends a sp
|returnToDock | Return mower to dock |
Example creating automation in HA gui:
![Services](/doc/6-Indego_Call_service.png)
Example for automations.yaml:
Expand Down
Binary file modified doc/1-Indego_Sensors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/2-Indego_State_details.png
Binary file not shown.
Binary file added doc/2-Indego_mower_state.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/3-Indego_Lawn_mowed.png
Binary file not shown.
Binary file added doc/3-Indego_lawn_mowed2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/4-Indego_Runtime_detail.png
Binary file not shown.
Binary file added doc/4-Indego_runtime_total.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/5-Indego_Battery_Sensor.png
Binary file not shown.
Binary file added doc/5-Indego_battery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/6-Indego_Call_service.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions indego/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def __init__(self):
#Get data for State,
IndegoAPI_Instance.getState()
IndegoAPI_Instance.MowerStateDescription()
IndegoAPI_Instance.MowerStateDescriptionDetailed()
IndegoAPI_Instance.Runtime()
IndegoAPI_Instance.RuntimeTotal()
IndegoAPI_Instance.RuntimeSession()
Expand Down
2 changes: 1 addition & 1 deletion indego/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"documentation": "https://github.com/jm-73/Indego",
"dependencies": [],
"codeowners": ["@jm-73"],
"requirements": ["pyIndego==0.2.7"]
"requirements": ["pyIndego==0.2.9"]
}
28 changes: 27 additions & 1 deletion indego/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ def setup_platform(hass, config, add_devices, discovery_info=None):

mower_state_sensor_name = GLOB_MOWER_NAME + ' mower state'
add_devices([IndegoStateSensor(API, mower_state_sensor_name)])

mower_state_sensor_name = GLOB_MOWER_NAME + ' mower state detail'
add_devices([IndegoStateSensorDetail(API, mower_state_sensor_name)])

lawn_mowed_sensor_name = GLOB_MOWER_NAME + ' lawn mowed'
add_devices([IndegoLawnMowedSensor(API, lawn_mowed_sensor_name)])
Expand Down Expand Up @@ -52,12 +55,35 @@ def icon(self):
@property
def device_state_attributes(self):
return {
'State #': self._IAPI._mower_state,
'Model': self._IAPI._model_description,
'Serial': self._IAPI._serial,
'Firmware': self._IAPI._alm_firmware_version
}

class IndegoStateSensorDetail(Entity):
def __init__(self, IAPI, device_label):
self._mower = mower
self._IAPI = IAPI
self._state = None
self._device_label = device_label
@property
def name(self):
return self._device_label
@property
def state(self):
return self._IAPI._mower_state_description_detailed
@property
def icon(self):
return 'mdi:robot'
#def update(self):
# self._mower.update(self)
@property
def device_state_attributes(self):
return {
'State #': self._IAPI._mower_state,
}


class IndegoLawnMowedSensor(Entity):
def __init__(self, IAPI, device_label):
self._mower = mower
Expand Down

0 comments on commit c4239b4

Please sign in to comment.