hass-core/tests/components
Myles Eftos 412ecacca3
Amberelectric (#56448)
* Add Amber Electric integration

* Linting

* Fixing some type hinting

* Adding docstrings

* Removing files that shouldn't have been changed

* Splitting out test helpers

* Testing the price sensor

* Testing Controlled load and feed in channels

* Refactoring mocks

* switching state for native_value and unit_of_measurement for native_unit_of_measurement

* Fixing docstrings

* Fixing requiremennts_all.txt

* isort fixes

* Fixing pylint errors

* Omitting __init__.py from test coverage

* Add missing config_flow tests

* Adding more sensor tests

* Applying suggested changes to __init.py__

* Refactor coordinator to return the data object with all of the relevent data already setup

* Another coordinator refactor - Better use the dictionary for when we build the sensors

* Removing first function

* Refactoring sensor files to use entity descriptions, remove factory

* Rounding renewable percentage, return icons correctly

* Cleaning up translation strings

* Fixing relative path, removing TODO

* Coordintator tests now accept new (more accurate) fixtures

* Using a description placeholder

* Putting missing translations strings back in

* tighten up the no site error logic - self._site_id should never be None at the point of loading async_step_site

* Removing DEVICE_CLASS, replacing the units with AUD/kWh

* Settings _attr_unique_id

* Removing icon function (it's already the default)

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Adding strings.json

* Tighter wrapping for try/except

* Generating translations

* Removing update_method - not needed as it's being overriden

* Apply suggestions from code review

Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>

* Fixing tests

* Add missing description placeholder

* Fix warning

* changing name from update to update_data to match async_update_data

* renaming [async_]update_data => [async_]update_price_data to avoid confusion

* Creating too man renewable sensors

* Override update method

* Coordinator tests use _async_update_data

* Using $/kWh as the units

* Using isinstance instead of __class__ test. Removing a zero len check

* Asserting self._sites in second step

* Linting

* Remove useless tests

Co-authored-by: jan iversen <jancasacondor@gmail.com>
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
2021-09-28 00:03:51 -07:00
..
abode
accuweather
acmeda
adax
adguard
advantage_air
aemet
agent_dvr
air_quality
airly
airnow
airthings Airthings (#56578) 2021-09-23 13:20:30 -07:00
airtouch4
airvisual
alarm_control_panel
alarmdecoder
alert
alexa Alexa fix Fan support and cleanup (#56053) 2021-09-24 08:14:45 +02:00
almond Add test fixture for unauthenticated HTTP client (#55561) 2021-09-02 13:09:16 +02:00
ambee
amberelectric Amberelectric (#56448) 2021-09-28 00:03:51 -07:00
ambiclimate
ambient_station
analytics
androidtv
apache_kafka
api Remove redundant aiohttp response status=200 kwargs (#56417) 2021-09-21 10:51:12 -07:00
api_streams
apns
apple_tv
apprise
aprs
arcam_fmj
arlo
asuswrt
atag
august Use hass_client_no_auth test fixture in integrations a-g (#55581) 2021-09-02 14:49:20 +02:00
aurora
auth
automation
awair Use EntityDescription - awair (#55747) 2021-09-06 09:40:41 +02:00
aws
axis
azure_devops
azure_event_hub
bayesian
binary_sensor
blackbird
blebox
blink
blueprint
bluetooth_le_tracker
bmw_connected_drive
bond Changed wording of bond state belief feature from belief to tracked state (#56147) 2021-09-12 15:46:43 -10:00
bosch_shc Fix zeroconf mock and use it in CI group 1's tests (#55526) 2021-09-01 22:38:00 +02:00
braviatv
broadlink Prevent 3rd party lib from opening sockets in broadlink tests (#55636) 2021-09-03 10:13:35 +02:00
brother
bsblan
buienradar
caldav
calendar
camera
canary
cast
cert_expiry Fix creating cert_expiry configs during runtime (#56298) 2021-09-18 19:54:54 +02:00
climacell
climate
cloud Simplify cloud request connection handling (#56243) 2021-09-22 07:51:31 -07:00
cloudflare
co2signal
coinbase
color_extractor
comfoconnect Add state_class and use SensorEntityDescription for comfoconnect (#54066) 2021-09-24 22:26:56 +02:00
command_line
compensation
config Prefer HTTPStatus over int in HA view JSON functions (#56504) 2021-09-22 21:59:52 +03:00
configurator
control4
conversation
coolmaster
coronavirus
counter
cover
crownstone Address Crownstone review comments (#56485) 2021-09-23 09:23:45 +02:00
daikin
darksky
datadog
debugpy
deconz deCONZ use siren platform (#56397) 2021-09-18 21:59:04 +02:00
default_config Mock out network.util.async_get_source_ip in tests (#56339) 2021-09-17 21:40:58 -10:00
demo
denonavr
derivative
device_automation Guard for unexpected exceptions in device automation (#55639) 2021-09-03 09:04:50 -07:00
device_sun_light_trigger
device_tracker
devolo_home_control Fix zeroconf mock and use it in CI group 1's tests (#55526) 2021-09-01 22:38:00 +02:00
dexcom
dhcp Make scapy imports in DHCP local (#55647) 2021-09-06 10:10:27 -07:00
dialogflow Use hass_client_no_auth test fixture in integrations a-g (#55581) 2021-09-02 14:49:20 +02:00
directv
discovery Netgear config flow (#54479) 2021-09-13 18:18:21 +02:00
dlna_dmr Config-flow for DLNA-DMR integration (#55267) 2021-09-27 15:47:01 -05:00
doorbird
dsmr
dte_energy_bridge
duckdns
dunehd
dynalite
dyson
eafm
ecobee
econet
ee_brightbox
efergy Move efergy api to pyefergy (#56594) 2021-09-24 12:54:15 +02:00
elgato
elkm1
emonitor
emulated_hue Replace util.get_local_ip in favor of components.network.async_get_source_ip() - part 2 (#53368) 2021-09-06 08:44:38 -10:00
emulated_kasa
emulated_roku Mock out network.util.async_get_source_ip in tests (#55592) 2021-09-02 20:44:50 +02:00
energy Energy validation: Require last_reset attribute to be set for state_class measurement energy and cost sensors (#56254) 2021-09-22 21:48:37 -07:00
enocean
enphase_envoy
epson Prevent 3rd party lib from opening sockets in epson tests (#55595) 2021-09-02 19:30:53 +02:00
esphome ESPHome Noise Transport Encryption support (#56216) 2021-09-20 09:02:17 +02:00
everlights
ezviz
faa_delays
facebook
facebox
fail2ban
fan
feedreader
ffmpeg
fido
file
filesize
filter
fireservicerota
firmata
fjaraskupan
flick_electric
flipr Address post merge review of flipr binary sensor (#55983) 2021-09-09 09:45:58 +02:00
flo
flume
flunearyou
flux
folder
folder_watcher
foobot
forecast_solar
forked_daapd
foscam
freebox
freedns
freedompro Prevent 3rd party lib from opening sockets in freedompro tests (#55596) 2021-09-02 19:32:19 +02:00
fritz Mock out network.util.async_get_source_ip in tests (#55592) 2021-09-02 20:44:50 +02:00
fritzbox Assume Fritz!Smarthome device as unavailable (#56542) 2021-09-23 13:29:12 -07:00
fritzbox_callmonitor
frontend
garages_amsterdam
gdacs
generic Use respx.mock in generic camera tests (#55521) 2021-09-01 20:45:29 +02:00
generic_hygrostat
generic_thermostat Fix generic thermostat switch state initialization (#56073) 2021-09-13 22:27:06 +02:00
geo_json_events
geo_location
geo_rss_events
geofency Use hass_client_no_auth test fixture in integrations a-g (#55581) 2021-09-02 14:49:20 +02:00
geonetnz_quakes
geonetnz_volcano
gios
glances Prevent 3rd party lib from opening sockets in glances tests (#56345) 2021-09-17 22:22:44 -10:00
goalzero
gogogate2
google
google_assistant Prevent 3rd party lib from opening sockets in google_assistant tests (#56346) 2021-09-21 11:27:10 -07:00
google_domains
google_pubsub
google_translate
google_travel_time
google_wifi
gpslogger Use hass_client_no_auth test fixture in integrations a-g (#55581) 2021-09-02 14:49:20 +02:00
graphite
gree
group Add component for binary sensor groups (#55365) 2021-09-13 15:28:37 +02:00
growatt_server Bump growattServer to 1.1.0 (#56084) 2021-09-15 10:08:15 +02:00
guardian
habitica
hangouts
harmony Add select entity to Logitech Harmony (#53943) 2021-08-28 14:10:19 -05:00
hassio Add cache-control headers to supervisor entrypoint (#55493) 2021-08-31 14:45:28 +02:00
hddtemp
heos
here_travel_time
hisense_aehw4a1
history Add 5-minute statistics for sensors (#56006) 2021-09-16 10:57:15 +02:00
history_stats
hive
hlk_sw16
home_connect Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
home_plus_control Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
homeassistant
homekit Remove leftover debug prints in tests (#56409) 2021-09-19 12:43:02 +02:00
homekit_controller Mock out zeroconf in homekit_controller tests (#56307) 2021-09-16 11:29:41 -10:00
homematic
homematicip_cloud
honeywell Try to avoid rate limiting in honeywell (#55304) 2021-09-07 16:32:26 +02:00
html5
http Remove redundant aiohttp response status=200 kwargs (#56417) 2021-09-21 10:51:12 -07:00
huawei_lte
hue Add zeroconf discovery to Hue (#55358) 2021-09-12 20:00:51 -07:00
huisbaasje
humidifier
hunterdouglas_powerview
hvv_departures
hyperion
ialarm
iaqualink
icloud
ifttt Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
ign_sismologia
image
image_processing Convert image_processing tests to pytest (#56451) 2021-09-22 15:00:28 +02:00
imap_email_content
influxdb
input_boolean
input_datetime
input_number
input_select
input_text
insteon
integration Address comment in integration Riemann sum PR #55875 (#55895) 2021-09-07 19:40:20 +02:00
intent
intent_script
ios
iotawatt Add iotawatt high-accuracy energy readout sensors (#55512) 2021-09-09 15:32:43 +02:00
ipma
ipp
iqvia
islamic_prayer_times
isy994 Do not reload the isy994 on ip change since there is already a reload listener (#54602) 2021-09-17 21:22:14 -10:00
izone
jewish_calendar
juicenet
keenetic_ndms2
kira
kmtronic
knx
kodi
konnected
kostal_plenticore
kraken
kulersky
lastfm Upgrade pylast from 4.2.0 to 4.2.1 (#56015) 2021-09-16 07:00:25 +02:00
lcn
light
litejet
litterrobot
local_file
local_ip
locative
lock
logbook Fix logbook entity_matches_only query mode (#55761) 2021-09-06 13:39:39 -07:00
logentries
logger
logi_circle
london_air
lovelace
luftdaten
lutron_caseta
lyric
mailbox
mailgun
manual Add vacation mode to manual alarm_control_panel (#55340) 2021-09-01 09:34:21 +02:00
manual_mqtt
marytts
maxcube
mazda
media_player
media_source
melcloud
melissa
meraki
met
met_eireann
meteo_france
meteoclimatic
metoffice
mfi
mhz19
microsoft_face
microsoft_face_detect
microsoft_face_identify
mikrotik
mill
min_max
minecraft_server
minio
mobile_app Allow confirming local push notifications (#54947) 2021-09-22 23:17:04 +02:00
mochad
modbus Modbus entity update does not occur until after scan_interval (#56221) 2021-09-18 08:57:27 +02:00
modem_callerid Add Config Flow to Modem Caller ID integration (#46677) 2021-09-13 14:22:54 -10:00
modern_forms
mold_indicator
monoprice
moon
motion_blinds
motioneye
mqtt Minor cleanup and test coverage improvement for MQTT (#55265) 2021-09-27 17:45:52 +02:00
mqtt_eventstream
mqtt_json
mqtt_room
mqtt_statestream
mullvad
mutesync
my
myq
mysensors
mythicbeastsdns
nam
namecheapdns
nanoleaf Convert Nanoleaf integration to use Async library aionanoleaf (#56548) 2021-09-23 15:37:37 -05:00
neato Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
ness_alarm
nest Use hass_client_no_auth test fixture in nest tests (#56326) 2021-09-18 23:17:09 +02:00
netatmo Split Netatmo camera persons by home (#55598) 2021-09-22 14:32:30 +02:00
netgear Netgear config flow (#54479) 2021-09-13 18:18:21 +02:00
network Add api to the network integration to get ipv4 broadcast addresses (#56722) 2021-09-27 21:43:39 -07:00
nexia
nextbus
nfandroidtv
nightscout
nmap_tracker Mock out network.util.async_get_source_ip in tests (#55592) 2021-09-02 20:44:50 +02:00
no_ip
notify Deprecate passing template to notify (#56069) 2021-09-20 21:49:02 -07:00
notify_events
notion Add ability to re-auth Notion (#55616) 2021-09-24 11:23:19 -07:00
nsw_fuel_station
nsw_rural_fire_service_feed
nuheat
nuki
numato
number
nut Remove unnecessary extra attribute from NUT sensors (#56078) 2021-09-10 19:17:46 -07:00
nws
nx584
nzbget
omnilogic
onboarding Prevent opening of sockets in onboarding tests (#56443) 2021-09-20 13:56:50 +02:00
ondilo_ico Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
onewire
onvif
openalpr_cloud
openalpr_local
openerz
openhardwaremonitor
opentherm_gw
openuv
openweathermap
opnsense
ovo_energy
owntracks Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
ozw
p1_monitor Update entity names for P1 Monitor integration (#55430) 2021-08-29 20:29:37 -07:00
panasonic_viera Prevent opening sockets in panasonic_viera tests (#56441) 2021-09-20 15:01:49 +02:00
panel_custom
panel_iframe
persistent_notification
person
philips_js
pi_hole
picnic Use EntityDescription - picnic (#55682) 2021-09-03 22:35:59 +02:00
pilight
ping Prevent 3rd party lib from opening sockets in ping tests (#56329) 2021-09-16 23:41:19 -10:00
plaato
plant
plex Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
plugwise
plum_lightpad
point
poolsense
powerwall
profiler
progettihwsw
prometheus
prosegur
proximity
ps4 Prevent 3rd party lib from opening sockets in ps4 tests (#56330) 2021-09-17 12:51:25 +02:00
push Use hass_client_no_auth test fixture in integrations h-p (#55583) 2021-09-02 14:49:40 +02:00
pushbullet
pvpc_hourly_pricing
python_script
qld_bushfire
qwikswitch
rachio
radarr
rainforest_eagle Add Eagle 200 name back (#55477) 2021-08-31 08:45:35 +02:00
rainmachine
random
recollect_waste Deprecate YAML config for ReCollect Waste (#55426) 2021-08-29 14:03:44 -06:00
recorder Add WS API for updating unit_of_measurement in statistics metadata (#56184) 2021-09-28 00:43:29 +02:00
reddit
remember_the_milk
remote
renault Adjust charging_power unit (#56167) 2021-09-15 07:54:56 +02:00
rest
rest_command
rflink
rfxtrx Rfxtrx device triggers and actions (#47909) 2021-09-17 15:28:43 +02:00
ring
risco
rituals_perfume_genie Add tests for Rituals Perfume Genie number, select and binary_sensor platforms (#55224) 2021-09-19 08:51:57 -10:00
rmvtransport
roku
roomba
roon
rpi_power
rss_feed_template
ruckus_unleashed
safe_mode
samsungtv Prevent 3rd party lib from opening sockets in samsungtv tests (#56334) 2021-09-18 22:24:27 -10:00
scene
screenlogic
script
search
season
select
sense
sensor Don't reset meter when last_reset is set to None (#56609) 2021-09-27 12:17:09 +02:00
sentry
seventeentrack
sharkiq
shell_command
shelly Add Shelly RPC device trigger and logbook platforms (#56428) 2021-09-21 00:09:44 +03:00
shopping_list
sia Prevent 3rd party lib from opening sockets in sia tests (#56325) 2021-09-16 23:19:19 -10:00
sigfox
sighthound
signal_messenger
simplisafe
simulated
siren
slack
sleepiq
sma
smappee Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
smart_meter_texas
smarthab
smartthings
smarttub
smhi Prevent 3rd party lib from opening sockets in smhi tests (#56335) 2021-09-19 10:18:45 +02:00
smtp
snips
solaredge
solarlog
soma
somfy Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
somfy_mylink
sonarr
songpal
sonos Add UPNP device connection for Sonos (#56702) 2021-09-27 17:36:47 +02:00
soundtouch
spaceapi
spc
speedtestdotnet Remove config for Speedtest.net (#55642) 2021-09-23 20:44:59 +02:00
spider
spotify Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
sql
squeezebox
srp_energy Fix flaky srp energy test (#56536) 2021-09-22 17:41:10 +02:00
ssdp Config-flow for DLNA-DMR integration (#55267) 2021-09-27 15:47:01 -05:00
starline
startca
statistics
statsd
stream Remove byte-range addressed parts in stream (#55396) 2021-08-30 13:20:19 +08:00
stt
subaru
sun
surepetcare Use SurePetcareEntity for surepetcare binary sensor (#56601) 2021-09-25 11:17:55 +02:00
switch
switchbot Discover Switchbot MAC in config flow (#56616) 2021-09-27 15:12:40 -05:00
switcher_kis Address Switcher late review comments (#56264) 2021-09-16 17:06:58 +02:00
syncthing
syncthru
synology_dsm Rewrite re-auth mechanism in Synology DSM integration (#54298) 2021-09-07 09:10:50 +02:00
system_bridge
system_health
system_log
tado Optimise requests to the tado servers (#56261) 2021-09-22 14:01:30 +02:00
tag
tasmota Automation trigger info type hint improvements (#55402) 2021-09-04 02:25:51 +02:00
tcp
telegram
tellduslive
template Update template/test_init.py to use pytest (#56336) 2021-09-17 15:13:17 -07:00
threshold
tibber
tile
time_date
timer
tod
tomato
toon Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
totalconnect
tplink Rework TPLink integration to use python-kasa (#56701) 2021-09-27 14:11:55 -05:00
traccar Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
trace
tractive
tradfri
transmission
transport_nsw
trend
tts
tuya
twentemilieu
twilio Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
twinkly
twitch
uk_transport
unifi Remove UniFi config entry reference from device when removing last entity of said device (#56501) 2021-09-27 12:04:29 +02:00
unifi_direct
universal
upb
upcloud
updater
upnp Move parts of ssdp to async_upnp_client (#55540) 2021-09-11 13:38:16 -10:00
uptime
uptimerobot
usb Prefer more targeted matchers in USB discovery (#56142) 2021-09-12 15:07:40 -07:00
usgs_earthquakes_feed
utility_meter Define unit_of_measurement of all utility_meter sensors on HA start (#56112) 2021-09-28 00:42:27 +02:00
uvc
vacuum
velbus Switch velbus from python-velbus to velbusaio (#54032) 2021-09-13 08:22:46 +02:00
venstar
vera
verisure
version
vesync
vilfo
vizio Use entity attributes for vizio integration (#56093) 2021-09-27 20:20:15 +02:00
voicerss
volumio
vultr Use EntityDescription - vultr (#55789) 2021-09-06 09:44:33 +02:00
wake_on_lan
wallbox Prevent 3rd party lib from opening sockets in wallbox tests (#56308) 2021-09-17 12:50:11 +02:00
water_heater
watttime Add WattTime integration (#56149) 2021-09-20 21:10:24 -07:00
waze_travel_time
weather
webhook Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
webostv
websocket_api Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
wemo Wemo Insight devices need polling when off (#55348) 2021-08-31 09:32:26 +02:00
whirlpool Add Whirlpool integration (#48346) 2021-09-13 10:02:34 -10:00
wiffi
wilight Prevent 3rd party lib from opening sockets in wilight tests (#56310) 2021-09-17 15:27:26 +02:00
withings Use hass_client_no_auth test fixture in withings tests (#56337) 2021-09-18 23:12:02 +02:00
wled
wolflink
workday
worldclock
wsdot
xbox Use hass_client_no_auth test fixture in integrations s-x (#55585) 2021-09-02 14:50:10 +02:00
xiaomi
xiaomi_aqara
xiaomi_miio
yale_smart_alarm
yamaha
yamaha_musiccast Move parts of ssdp to async_upnp_client (#55540) 2021-09-11 13:38:16 -10:00
yandex_transport
yandextts
yeelight Ensure yeelight can be unloaded when device is offline (#56464) 2021-09-26 09:54:43 -07:00
youless
zeroconf Avoid enabling ipv6 dual stack for zeroconf on unsupported platforms (#56584) 2021-09-26 09:51:34 -07:00
zerproc
zha ZHA channel ZCL attributes initialization (#56476) 2021-09-22 11:34:30 -04:00
zodiac
zone
zwave
zwave_js Add node sensor status icons (#56137) 2021-09-27 12:50:14 +02:00
__init__.py
conftest.py