Skip to content

Commit

Permalink
Introduced a new device class "plug" for the binary sensor. (#558)
Browse files Browse the repository at this point in the history
* Introduced a new device class "plug" for the binary sensor.

See #550

* removed plug as domain
  • Loading branch information
echox authored and balloob committed Nov 5, 2017
1 parent 9b0f4fa commit ba5f401
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/hass-attributes-util.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
binary_sensor: [
'connectivity', 'light', 'moisture', 'motion', 'occupancy', 'opening',
'sound', 'vibration', 'gas', 'power', 'safety', 'smoke', 'cold', 'heat',
'moving'],
'moving', 'plug'],
cover: ['garage'],
};

Expand Down
3 changes: 3 additions & 0 deletions src/util/hass-util.html
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@
case 'safety':
case 'smoke':
return activated ? 'mdi:verified' : 'mdi:alert';
case 'plug':
return activated ? 'mdi:power-plug-off' : 'mdi:power-plug';
default:
return activated ? 'mdi:radiobox-blank' : 'mdi:checkbox-marked-circle';
}
Expand Down Expand Up @@ -497,6 +499,7 @@
case 'light':
case 'moving':
case 'power':
case 'plug':
default:
}
} else if (domain === 'input_datetime') {
Expand Down

0 comments on commit ba5f401

Please sign in to comment.