-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[robonect] Add blade status channel (#15061)
* Add blade status channel in Robonect binding Signed-off-by: Christian Jonak-Möchel <[email protected]> Signed-off-by: Leo Siepel <[email protected]>
- Loading branch information
Showing
9 changed files
with
171 additions
and
38 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
...ab.binding.robonect/src/main/java/org/openhab/binding/robonect/internal/model/Blades.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* Copyright (c) 2010-2024 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.robonect.internal.model; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
/** | ||
* Blade information from the mower. | ||
* | ||
* @author Christian Jonak-Moechel - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public class Blades { | ||
|
||
private int quality; | ||
|
||
private int hours; | ||
|
||
private int days; | ||
|
||
/** | ||
* @return - the quality of the blades in %. | ||
*/ | ||
public int getQuality() { | ||
return quality; | ||
} | ||
|
||
/** | ||
* @return - the hours of how many days the blades have been actively in use | ||
*/ | ||
public int getHours() { | ||
return hours; | ||
} | ||
|
||
/** | ||
* @return - the days since the blades have been changed the last time | ||
*/ | ||
public int getDays() { | ||
return days; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
bundles/org.openhab.binding.robonect/src/main/resources/OH-INF/update/instructions.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | ||
<update:update-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:update="https://openhab.org/schemas/update-description/v1.0.0" | ||
xsi:schemaLocation="https://openhab.org/schemas/update-description/v1.0.0 https://openhab.org/schemas/update-description-1.0.0.xsd"> | ||
|
||
<thing-type uid="robonect:mower"> | ||
<instruction-set targetVersion="1"> | ||
<add-channel id="blades-quality"> | ||
<type>robonect:blades-quality</type> | ||
</add-channel> | ||
<add-channel id="blades-usage-hours"> | ||
<type>robonect:blades-usage-hours</type> | ||
</add-channel> | ||
<add-channel id="blades-replacement-days"> | ||
<type>robonect:blades-replacement-days</type> | ||
</add-channel> | ||
</instruction-set> | ||
</thing-type> | ||
|
||
</update:update-descriptions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters