File tree 2 files changed +8
-3
lines changed
homeassistant/components/husqvarna_automower
tests/components/husqvarna_automower
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,10 @@ def activity(self) -> LawnMowerActivity:
110
110
mower_attributes = self .mower_attributes
111
111
if mower_attributes .mower .state in PAUSED_STATES :
112
112
return LawnMowerActivity .PAUSED
113
- if mower_attributes .mower .activity in MOWING_ACTIVITIES :
113
+ if mower_attributes .mower .state in MowerStates .IN_OPERATION :
114
+ if mower_attributes .mower .activity == MowerActivities .GOING_HOME :
115
+ return LawnMowerActivity .RETURNING
114
116
return LawnMowerActivity .MOWING
115
- if mower_attributes .mower .activity == MowerActivities .GOING_HOME :
116
- return LawnMowerActivity .RETURNING
117
117
if (mower_attributes .mower .state == "RESTRICTED" ) or (
118
118
mower_attributes .mower .activity in DOCKED_ACTIVITIES
119
119
):
Original file line number Diff line number Diff line change 32
32
MowerStates .IN_OPERATION ,
33
33
LawnMowerActivity .RETURNING ,
34
34
),
35
+ (
36
+ MowerActivities .NOT_APPLICABLE ,
37
+ MowerStates .IN_OPERATION ,
38
+ LawnMowerActivity .MOWING ,
39
+ ),
35
40
],
36
41
)
37
42
async def test_lawn_mower_states (
You can’t perform that action at this time.
0 commit comments