manufacturer | model id | name | measure_device |
---|---|---|---|
anko | 42997610 | Anko Smart String Lights 42997610 | TP-Link Tapo P110 |
aqara | ZNLDP12LM | Aqara LED light bulb (tunable white) | Shelly Plug E |
arlec | GLD115HA | Arlec Smart R80 9.5W 806lm CCT Bulb | TP-Link Tapo P110 |
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
import logging | |
from typing import cast | |
from homeassistant.components.group import DOMAIN as GROUP_DOMAIN | |
from homeassistant.components.light import DOMAIN as LIGHT_DOMAIN | |
from homeassistant.components.sensor import SensorDeviceClass | |
from homeassistant.const import ATTR_ENTITY_ID, CONF_DOMAIN, CONF_ENTITY_ID | |
from homeassistant.core import HomeAssistant, callback | |
from homeassistant.helpers import area_registry, device_registry, entity_registry | |
from homeassistant.helpers.entity import Entity |
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
{ | |
"entry_id": "7084c49423ea2f4ff6c905f4c90738da", | |
"version": 2, | |
"domain": "powercalc", | |
"title": "Lower Bathroom Speaker", | |
"data": { | |
"entity_id": "media_player.googlehome8812", | |
"manufacturer": "google", | |
"model": "Home Mini (HOA)", | |
"unique_id": "pc_d67fe854-1aea-8a23-dfda-8df4d4db5f31", |
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
from __future__ import annotations | |
import inspect | |
import logging | |
from typing import cast | |
import homeassistant.helpers.entity_registry as er | |
from awesomeversion.awesomeversion import AwesomeVersion | |
from homeassistant.components.select import DOMAIN as SELECT_DOMAIN | |
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN |
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
"""Platform for sensor integration.""" | |
from __future__ import annotations | |
import copy | |
import logging | |
import uuid | |
from datetime import timedelta | |
from typing import Any, Final, NamedTuple, Optional, cast |
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
"""Component to integrate ambilight for TVs exposing the Joint Space API.""" | |
from __future__ import annotations | |
import logging | |
from haphilipsjs import PhilipsTV | |
from haphilipsjs.typing import AmbilightCurrentConfiguration | |
from homeassistant.components.light import ( | |
ATTR_BRIGHTNESS, | |
ATTR_EFFECT, |
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
class OpeningPeriodStrategy implements StrategyInterface, TranslatorAwareInterface | |
{ | |
use TranslatorAwareTrait; | |
/** | |
* @param Campsite $campsite | |
* @return Information | |
*/ | |
public function getInformation(Campsite $campsite) | |
{ |
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
Mockery::on(function($a, $b) { | |
$this->assertEquals('foo', $a); | |
return true; | |
}); |
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
//Dit werkt wel | |
$('#js-searchresults-change-data').on('click', function() { | |
// Append a overlay for the form | |
$('#main').append('<div id="js-searchresults-form-overlay" class="searchresults-overlay searchresults-overlay--form"></div>'); | |
$('#js-searchresults-form, #js-searchresults-form-overlay').velocity('fadeIn', {duration: 300}); | |
}) | |
//Dit werkt niet | |
/*$(document).on('click', '#js-searchresults-change-data', function (event) { |
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
class MyResource extends AbstractResourceListener implements ResourceInterface | |
{ | |
public function fetch($id) | |
{ | |
$entity = $this->getEntityById($id, false); | |
if ($entity === null) { | |
return new ApiProblemResponse(new ApiProblem(404, 'Entity with ID ' . $id . ' not found')); | |
} | |
return $entity; |
NewerOlder