Skip to content

Commit

Permalink
1.5.21
Browse files Browse the repository at this point in the history
Some technical corrections
  • Loading branch information
RonnyWinkler committed May 7, 2024
1 parent 6711d44 commit 3c2e935
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .homeychangelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,10 @@
"1.5.20": {
"en": "Fixed 'triggered' state for alarm panel device.",
"de": "'triggered' Status für Alarmpanel-Gerät korrigiert."
},
"1.5.21": {
"en": "Some technical corrections.",
"de": "Einige technische Korrekturen."
}

}
2 changes: 1 addition & 1 deletion .homeycompose/app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "io.home-assistant.community",
"version": "1.5.20",
"version": "1.5.21",
"compatibility": ">=8.1.0",
"sdk": 3,
"brandColor": "#0DA6EA",
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"_comment": "This file is generated. Please edit .homeycompose/app.json instead.",
"id": "io.home-assistant.community",
"version": "1.5.20",
"version": "1.5.21",
"compatibility": ">=8.1.0",
"sdk": 3,
"brandColor": "#0DA6EA",
Expand Down
4 changes: 2 additions & 2 deletions drivers/basedevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ class BaseDevice extends Homey.Device {
await this.setUnavailable(this.homey.__("device_unavailable_reason.entity_unavailable"));
}
else{
this.setAvailable();
await this.setAvailable();
}
}
if (this.hasCapability("measure_power") &&
this.powerEntityId != null &&
data.entity_id == this.powerEntityId){
let convert = this.inputConverter("measure_power");
let value = convert(data.state);
this.setCapabilityValue("measure_power", value)
await this.setCapabilityValue("measure_power", value)
}
// Update dynamically added device entities
await this.deviceEntitiesUpdate(data);
Expand Down
6 changes: 3 additions & 3 deletions drivers/media/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class MediaDevice extends BaseDevice {
await this.setCapabilityValue("volume_set", Math.round(convert(data.attributes.volume_level)*100)/100);
}
if (this.hasCapability("volume_mute") && data.attributes.is_volume_muted != null){
this.setCapabilityValue("volume_mute", data.attributes.is_volume_muted);
await this.setCapabilityValue("volume_mute", data.attributes.is_volume_muted);
}
if (this.hasCapability("speaker_playing") && data.state != null && data.state != undefined){
switch (data.state){
Expand Down Expand Up @@ -169,10 +169,10 @@ class MediaDevice extends BaseDevice {
}
if (this.hasCapability("speaker_artist")){
if ( data.attributes.media_artist != null && data.attributes.media_artist != undefined && typeof data.attributes.media_artist === "string" ){
this.setCapabilityValue("speaker_artist", data.attributes.media_artist);
await this.setCapabilityValue("speaker_artist", data.attributes.media_artist);
}
else{
this.setCapabilityValue("speaker_artist", "");
await this.setCapabilityValue("speaker_artist", "");
}
}
if (this.hasCapability("speaker_album")){
Expand Down

0 comments on commit 3c2e935

Please sign in to comment.