Version 0.7

This commit is contained in:
Hans Karlinius
2017-06-03 11:14:29 +02:00
parent 4bbe251a5d
commit 39b5e428a0
3 changed files with 10 additions and 6 deletions

View File

@@ -1,3 +1,7 @@
#### Version 0.7
##### Fixed
- Settings info example proper url
#### Version 0.6
##### Added
- Support for switch

10
HASS.pm
View File

@@ -94,12 +94,12 @@ sub getEntities {
sub getEntity {
my ($client, $cb, $params, $args) = @_;
my $localurl = $prefs->get('connect').'states';
my $url = $prefs->get('connect').'states';
if (defined $args->{'entity_id'}) {
$localurl = $localurl.'/'.$args->{'entity_id'};
$url = $url.'/'.$args->{'entity_id'};
}
$log->debug('Get Entity: ', $localurl);
$log->debug('Get Entity: ', $url);
my $http = Slim::Networking::SimpleAsyncHTTP->new(
sub {
@@ -112,7 +112,7 @@ sub getEntity {
$cb->($result);
},
sub {
$log->error("Error (".$localurl."): $_[1]");
$log->error("Error (".$url."): $_[1]");
$cb->();
},
{
@@ -122,7 +122,7 @@ sub getEntity {
);
$http->get(
$localurl,
$url,
'x-ha-access' => $prefs->get('pass'),
'Content-Type' => 'application/json',
'charset' => 'UTF-8',

View File

@@ -16,5 +16,5 @@
<minVersion>7.6</minVersion>
</targetApplication>
<type>2</type>
<version>0.6</version>
<version>0.7</version>
</extension>