Skip to content
Closed
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
620 commits
Select commit Hold shift + click to select a range
ea9fba0
Bump pysmartthings (#24659)
andrewsayre Jun 20, 2019
428a823
Fix AttributeError: 'NoneType' object has no attribute 'group' with s…
foreign-sub Jun 20, 2019
8f0dcd0
braviatv, nmap_tracker: use getmac for getting MAC addresses (#24628)
scop Jun 20, 2019
1d09ea2
Fix downloader_download_failed event not firing for HTTP response err…
sfjes Jun 20, 2019
ffbb782
Update azure-pipelines-wheels.yml for Azure Pipelines
pvizeli Jun 21, 2019
7f98d7d
Multiple devices support for opentherm_gw (#22932)
mvn23 Jun 21, 2019
b0c83ed
Update azure-pipelines-wheels.yml for Azure Pipelines
pvizeli Jun 21, 2019
2f31b73
Vlc telnet (#24290)
rodripf Jun 21, 2019
ce84868
Clean up Google Config (#24663)
balloob Jun 21, 2019
25a9ac6
Prefere binary with wheels (#24669)
pvizeli Jun 21, 2019
8652b80
Updated frontend to 20190620.0
balloob Jun 21, 2019
ba84d7f
Updated frontend to 20190620.0
balloob Jun 21, 2019
612fd02
Vlc telnet (#24290)
rodripf Jun 21, 2019
f4cc860
Bump ZHA dependencies. (#24637)
Adminiuga Jun 20, 2019
13eade5
Upgrade blinkpy==0.14.1 for startup bugfix (#24656)
fronzbot Jun 20, 2019
fb0b40e
Add device class support for Ambient PWS sensors (#24677)
bachya Jun 21, 2019
229bc3a
Bumped version to 0.95.0b1
balloob Jun 21, 2019
2d20ce1
Update azure-pipelines-release.yml for Azure Pipelines
pvizeli Jun 21, 2019
72ac0b7
Improve autodiscovered yeelights model detection (#24671)
zewelor Jun 21, 2019
cc2337c
Allow extra js modules to be included in frontend (#24675)
thomasloven Jun 21, 2019
52122af
Add RainMachine device classes where appropriate (#24682)
bachya Jun 21, 2019
4cd2272
Change Ambient solar radiation units to lx (#24690)
bachya Jun 22, 2019
334292a
Upgrade to async_upnp_client==0.14.10 and increase search timeout (#2…
StevenLooman Jun 22, 2019
cd83c25
Upgrade mypy to 0.710 (#24666)
scop Jun 22, 2019
72552ea
Template: Expand method to expand groups, and closest as filter (#23691)
Swamp-Ig Jun 22, 2019
f4c42ac
Add aml_thermal label (#24665)
jmw6773 Jun 22, 2019
0d7a5ba
Corrected number of default LCN segment coupler scan tryouts (#24678)
alengwenus Jun 22, 2019
0700770
Fix time expression parsing (#24696)
amelchio Jun 22, 2019
571c9db
Upgrade discord.py to 1.2.2 (#24695)
fabaff Jun 22, 2019
7ce6859
Upgrade youtube_dl to 2019.06.08 (#24692)
fabaff Jun 22, 2019
c7c7fda
ZHA fix device type mappings (#24699)
dmulcahey Jun 22, 2019
89f7e44
Upgrade Sphinx to 2.1.2 (#24693)
fabaff Jun 23, 2019
827ab5d
Bump version pyatmo to 2.0.1 (#24703)
cgtobi Jun 23, 2019
854fac6
Solax update 0.1.0 (#24708)
squishykid Jun 23, 2019
031410d
Fix PS4 entities with shared host not updating and latency with multi…
ktnrg45 Jun 23, 2019
7f5720d
Update ZHA dependencies (#24718)
dmulcahey Jun 23, 2019
4219f6c
Update owner stream integration
balloob Jun 23, 2019
53e9dbe
Extend websocket method usage to port 8002 in Samsung TV media player…
2sheds Jun 23, 2019
7713364
Add initial support for remote dev container (#24681)
pvizeli Jun 23, 2019
8b6cc11
Expose ports 8123, 8300 and 51827 in Dockerfile (#24389)
Jun 23, 2019
e66a7ec
Bump pyatmo to v2.1.0 (#24724)
cgtobi Jun 24, 2019
c295e1d
Add Trafikverket train component (#23470)
endor-force Jun 24, 2019
0f175b0
Add show_as_state options to Life360 (#24725)
pnbruckner Jun 24, 2019
974db4e
Updated frontend to 20190624.0
balloob Jun 24, 2019
33e5262
Updated frontend to 20190624.0
balloob Jun 24, 2019
6e1b54f
Update translations
balloob Jun 24, 2019
0a62608
Bump version pyatmo to 2.0.1 (#24703)
cgtobi Jun 23, 2019
4fb7a27
Update ZHA dependencies (#24718)
dmulcahey Jun 23, 2019
f85898e
Bumped version to 0.95.0b2
balloob Jun 24, 2019
ce650bf
Add 'unique_id' Property to Inverter Sensors (#24707)
squishykid Jun 24, 2019
b7800b4
Save cached logi_circle tokens in config folder (#24726)
evanjd Jun 24, 2019
93f4576
Remove device and entity registry entries when removing a ZHA device …
dmulcahey Jun 24, 2019
fdf4ca9
Add support for sensor state STATE_UNAVAILABLE (#24641)
cnrd Jun 24, 2019
dfc5483
Update ZHA dependencies. (#24736)
Adminiuga Jun 24, 2019
7f520eb
AdGuard to update entry (#24737)
balloob Jun 24, 2019
f6dab61
Update pysonos to 0.0.17 (#24740)
amelchio Jun 24, 2019
0df67a9
Update ZHA dependencies. (#24736)
Adminiuga Jun 24, 2019
26ff56c
Update pysonos to 0.0.17 (#24740)
amelchio Jun 24, 2019
8f37d8b
Bumped version to 0.95.0b3
balloob Jun 24, 2019
cb44f08
Fix locative device update (#24744)
MartinHjelmare Jun 25, 2019
9bb38f2
Improve Alexa error handling (#24745)
balloob Jun 25, 2019
8ee6543
Updated frontend to 20190624.1
balloob Jun 25, 2019
80181e4
Updated frontend to 20190624.1
balloob Jun 25, 2019
cf9eea8
Clean up Google Config (#24663)
balloob Jun 21, 2019
251c3be
Improve Alexa error handling (#24745)
balloob Jun 25, 2019
f260efa
Bumped version to 0.95.0b4
balloob Jun 25, 2019
dbf80c4
Add integration for Vallox Ventilation Units (#24660)
andre-richter Jun 25, 2019
64dd7e8
Handle timeouts gracefully (#24752)
cgtobi Jun 25, 2019
039f0fc
Ignore duplicate tradfri discovery (#24759)
balloob Jun 25, 2019
e9f932c
Vallox: Fix missing hass member (#24753)
andre-richter Jun 25, 2019
aa5ea9b
Remove obsolete comments in Dockerfile (#24748)
Emilv2 Jun 25, 2019
48dfed2
fix an error in the description (#24735)
alain57 Jun 25, 2019
793b047
Return correct name for met.no (#24763)
Danielhiversen Jun 25, 2019
7f41889
Update Waze route dependency to 0.10 (#24754)
johntdyer Jun 25, 2019
de1461f
Add support for IPP Printers to the CUPS integration (#24756)
Matte23 Jun 25, 2019
3e68be3
Enhancement/zha model manuf (#24771)
Adminiuga Jun 26, 2019
dfa1058
Updated frontend to 20190626.0
balloob Jun 26, 2019
4243bd1
Updated frontend to 20190626.0
balloob Jun 26, 2019
6d4c340
Bump pyatmo to v2.1.0 (#24724)
cgtobi Jun 24, 2019
8145daf
Bumped version to 0.95.0
balloob Jun 26, 2019
fb565fe
Entity to handle updates via events (#24733)
balloob Jun 26, 2019
cda10aa
Upgrade vallox to async client API (#24774)
andre-richter Jun 26, 2019
954e1f5
Fix life360 exception when no location provided (#24777)
pnbruckner Jun 26, 2019
bed03fb
Pubnub to 1.0.8 (#24781)
Jun 26, 2019
132a615
Upgrade pytest to 4.6.3 (#24782)
scop Jun 27, 2019
add808f
Catch uncaught Alexa error (#24785)
balloob Jun 27, 2019
8a556d0
Pubnub to 1.0.8 (#24781)
Jun 26, 2019
2268e4d
Bumped version to 0.95.1
balloob Jun 27, 2019
581b319
Add time delta option when searching for deutsche_bahn connections (#…
h3ndrik Jun 27, 2019
85d0d2b
Update azure-pipelines-release.yml for Azure Pipelines (#24800)
pvizeli Jun 27, 2019
e16fefd
Make sure entity config is never none (#24801)
balloob Jun 27, 2019
5d87f5e
Bump ZHA quirks module (#24802)
dmulcahey Jun 27, 2019
cbe1ed3
Zestimate fix for issue #23837 (#23838)
dreed47 Jun 27, 2019
e5713d7
Fix another Life360 bug (#24805)
pnbruckner Jun 27, 2019
84dd9c6
Use climate device's target temp step value (#24804)
andersonshatch Jun 27, 2019
048370a
Use step from tado rather than assuming 0.1 (#24807)
andersonshatch Jun 27, 2019
180fe14
Updated frontend to 20190627.0
balloob Jun 28, 2019
0563c9d
Changed default encoding to mp3 (#24808)
GrandNewbien Jun 28, 2019
ed64731
Fix netatmo weatherstation setup error (#24788)
cgtobi Jun 28, 2019
4f175e7
Add developer tools panel (#24812)
balloob Jun 28, 2019
9d4182f
Fix calling empty script turn off (#24827)
balloob Jun 28, 2019
7b8c101
Bump ZHA quirks module (#24802)
dmulcahey Jun 27, 2019
6a0529c
Bumped version to 0.95.2
balloob Jun 28, 2019
f8a07ac
Add template vacuum support (#22904)
luukd Jun 28, 2019
f75d79b
Full speed azure
pvizeli Jun 28, 2019
953cfba
Update azure-pipelines-ci.yml for Azure Pipelines
pvizeli Jun 28, 2019
f441327
Update azure-pipelines-ci.yml for Azure Pipelines
pvizeli Jun 28, 2019
e6b18b1
Update azure-pipelines-ci.yml for Azure Pipelines
pvizeli Jun 28, 2019
d919150
Update azure-pipelines-ci.yml for Azure Pipelines
pvizeli Jun 28, 2019
f8eb681
Fix vacuum tests
balloob Jun 28, 2019
ab5571c
Update azure-pipelines-ci.yml for Azure Pipelines
pvizeli Jun 28, 2019
a309a22
Make sure alert is set up after notify (#24829)
balloob Jun 28, 2019
ffe99a2
Remove temperature attribute from SimpliSafe alarm control panel (#24…
bachya Jun 29, 2019
63dd8ae
Alexa sync state report (#24835)
balloob Jun 29, 2019
c70c15d
Bumped version to 0.95.3
balloob Jun 29, 2019
e25b87c
Fronius (solar energy and inverter) component (#22316)
nielstron Jun 29, 2019
0bdf3d0
Guard for None entity config (#24838)
balloob Jun 29, 2019
4602f96
Bumped version to 0.95.4
balloob Jun 29, 2019
301cb0d
Add template support to template trigger's for option (#24810)
pnbruckner Jun 29, 2019
175acb9
Upgrade sisyphus-control to 2.2 (#24837)
jkeljo Jun 29, 2019
ad11b78
Fix yeelight color temp getter (#24830)
zewelor Jun 29, 2019
cfad426
Upgrade luftdaten to 0.6.1 (#24842)
fabaff Jun 29, 2019
b220771
Upgrade sqlalchemy to 1.3.5 (#24844)
fabaff Jun 29, 2019
e17bb54
Upgrade numpy to 1.16.4 (#24845)
fabaff Jun 29, 2019
8d462de
Upgrade certifi to >= 2019.6.16 (#24846)
fabaff Jun 29, 2019
97f30b3
Upgrade pyyaml to 5.1.1 (#24847)
fabaff Jun 29, 2019
45b5c25
Upgrade jinja2 to >=2.10.1 (#24851)
fabaff Jun 29, 2019
7795c81
Upgrade psutil to 5.6.3 (#24854)
fabaff Jun 29, 2019
4c9ff44
Upgrade cryptography to 2.7 (#24852)
fabaff Jun 30, 2019
df9cf54
Fix mysensors icon name (#24871)
zewelor Jun 30, 2019
4b3ff33
Update praw to 6.3.1 (#23737)
fabaff Jun 30, 2019
bee31b5
Hungarian is also supported in Google Cloud TTS (#24861)
realthk Jun 30, 2019
6890452
Upgrade youtube_dl to 2019.06.27 (#24875)
fabaff Jun 30, 2019
e66cfba
Velbus: autodiscover covers (#24877)
cereal2nd Jun 30, 2019
4d99fb1
Upgrade importlib-metadata to 0.18 (#24848)
fabaff Jul 1, 2019
8ad61d2
Upgrade bcrypt to 3.1.7 (#24850)
fabaff Jul 1, 2019
231258e
Fix traceback during ZHA device removal (#24882)
dmulcahey Jul 1, 2019
dbc0db2
Move SmartThings imports to top (#24878)
andrewsayre Jul 1, 2019
c52bdca
Update translations
balloob Jul 1, 2019
7cfd918
Updated frontend to 20190630.0
balloob Jul 1, 2019
5df01f7
Bump androidtv to 0.0.17 (#24886)
JeffLIrion Jul 1, 2019
f1acecc
Upgrade pytest to 5.0.0 (#24885)
Danielhiversen Jul 1, 2019
4919c73
Tweak geniushub battery icons according to device state (#24798)
zxdavb Jul 1, 2019
99e287b
Support mqtt discovery topic prefix with slashes (#24840)
cybe Jul 1, 2019
77c2605
Update tts.py (#24892)
kevank Jul 1, 2019
44bb480
go back to signals and no hard entity references (#24894)
dmulcahey Jul 1, 2019
df034ee
Update IDs for rename node/value (#24646)
Swamp-Ig Jul 1, 2019
c13d45a
Add git editor / app port
pvizeli Jul 2, 2019
e584ab2
Bump life360 package to 4.0.1 (#24905)
pnbruckner Jul 2, 2019
518ed2b
Update devcontainer.json
pvizeli Jul 2, 2019
c5f3d6f
Update devcontainer.json
pvizeli Jul 2, 2019
b41debc
Update devcontainer.json
pvizeli Jul 2, 2019
4362dd3
Stability improvements for Sonos availability (#24880)
amelchio Jul 2, 2019
6fdbd33
Fix 'same state' monitoring in numeric_state trigger (#24910)
pnbruckner Jul 2, 2019
5cfa2e6
Fix 'same state' monitoring in state trigger (#24904)
pnbruckner Jul 2, 2019
c5e2d08
Add missing trigger.for variable to template trigger (#24893)
pnbruckner Jul 2, 2019
50a373c
Add ability to send attachments in pushover notifications (#24806)
kreegahbundolo Jul 2, 2019
2d197bc
Updated frontend to 20190702.0
balloob Jul 2, 2019
e1e21b8
Fix home coach discovery (#24902)
cgtobi Jul 3, 2019
63f3a62
New languages that looks like supported by Google but not documented:…
lufton Jul 3, 2019
ec7f1c5
Remove ZHA device entity (#24909)
dmulcahey Jul 3, 2019
043717e
Bump androidtv to 0.0.18 (#24927)
JeffLIrion Jul 3, 2019
9f1f187
Update pysonos to 0.0.19 (#24930)
amelchio Jul 3, 2019
eb853fe
Add support for Yale YRL256 lock (#24932)
ctso Jul 3, 2019
210f40e
Fix exclusion of routes with excl_filter (#24928)
gadgetchnnel Jul 3, 2019
14f1ff2
New scanner device tracker and ZHA device tracker support (#24584)
dmulcahey Jul 4, 2019
1b1f579
Allow updating of via_device in device registry (#24921)
bachya Jul 4, 2019
124a00c
Update pyHik library to 0.2.3 (#24957)
mezz64 Jul 5, 2019
34b208c
Implement ADR0003 for Netatmo sensor (#24944)
cgtobi Jul 5, 2019
a9c065e
Fix monitoring of trays in syncthru component (#24961)
nielstron Jul 5, 2019
24c3543
Batch of Component(s) -> Integration(s) (#24972)
frenck Jul 5, 2019
7541a82
Add sonos.play_queue service (#24974)
apeeters Jul 6, 2019
ac69883
Fix errors if rest source becomes unavailable (#24986)
slackr31337 Jul 6, 2019
5ee45a9
Switched from tuyapy to tuyaha as 1st one is not maintained (#24821)
PaulAnnekov Jul 6, 2019
1e3cb84
Adds Lock Threads Probot (#24984)
frenck Jul 6, 2019
7a58e10
Adds Stale Probot for issues (#24985)
frenck Jul 6, 2019
d86d395
Upgrade mypy to 0.711, drop no longer needed workarounds (#24998)
scop Jul 7, 2019
4344b41
Changes as per code review of #24646 (#24917)
Swamp-Ig Jul 7, 2019
0102beb
Sleepiq single sleeper crash (#24941)
qypea Jul 7, 2019
406732b
Add support for aurora ABB Powerone solar photovoltaic inverter (#24809)
davet2001 Jul 7, 2019
fec4e62
Test dependency updates (#25004)
scop Jul 7, 2019
0da00a5
upgrade switchmate to latest lib (#25006)
Danielhiversen Jul 7, 2019
606bf10
Upgrade hdate==0.8.8 (#25008)
tsvi Jul 7, 2019
7f683d2
Upgrade insteonplm to 0.16.0 and add INSTEON scene triggering (#24765)
teharris1 Jul 7, 2019
ff81243
Install requirements for integrations in packages before importing th…
ludeeus Jul 7, 2019
fd6bb99
Added missing yeelight models mapping (#24963)
cadavre Jul 8, 2019
6aae371
Correct socket use in cert_expiry platform (#25011)
elupus Jul 8, 2019
b79b031
Climate 1.0 (#23899)
pvizeli Jul 8, 2019
4ad25d4
Implement Twilio SMS notify MediaUrl support (#24971)
Chris-Johnston Jul 8, 2019
baafb5d
Enphase envoy individual inverter production (#24445)
jesserizzo Jul 8, 2019
cc3fe9c
Add support for arcam fmj receivers (#24621)
elupus Jul 8, 2019
1062a0c
Sensibo, add HVAC_MODE_OFF (#25016)
Danielhiversen Jul 8, 2019
1a8b11e
Fix ecobee flaky test (#25019)
balloob Jul 8, 2019
01d3e33
Fix mimetypes on borked Windows machines (#25018)
balloob Jul 8, 2019
167defb
Add datetime option to input_datetime.set_datetime service (#24975)
pnbruckner Jul 8, 2019
c7d5067
Add template support to numeric_state trigger's for option (#24955)
pnbruckner Jul 8, 2019
0bcb676
Add template support to state trigger's for option (#24912)
pnbruckner Jul 8, 2019
5ec52e1
Fix Nest sensor (#25023)
balloob Jul 8, 2019
c84052a
ambiclimate hvac_modes (#25015)
Danielhiversen Jul 8, 2019
7cccd3d
homematic add off support for climate (#25017)
pvizeli Jul 8, 2019
fd5ecff
Support config flow on custom components (#24946)
elupus Jul 8, 2019
373976c
Improve SmartThings test mocking (#25028)
andrewsayre Jul 9, 2019
8d00788
Toon fixes for Climate 1.0 (#25027)
frenck Jul 9, 2019
061081f
Add hvac fan state (#25030)
andrewsayre Jul 9, 2019
a46e5b6
Add support for Notion Home Monitoring (#24634)
bachya Jul 9, 2019
b5b4610
Fix Netatmo climate presets (#25029)
cgtobi Jul 9, 2019
826cf9b
Add missing support for jewish_calendar.omer_count sensor (#24958)
arigilder Jul 9, 2019
e4e8a7c
Centralizes Toon data, reducing API calls (#23988)
frenck Jul 9, 2019
ddf83a7
Update build pipeline
pvizeli Jul 9, 2019
9218634
Upgrade youtube_dl to 2019.07.02 (#24990)
fabaff Jul 9, 2019
6572133
updated geojson_client library to version 0.4 (#25039)
exxamalte Jul 9, 2019
180b744
Improve toon climate (#25040)
frenck Jul 9, 2019
c532b93
Fix Netatmo rain gauge precision (#25036)
cgtobi Jul 9, 2019
07f6d59
Bump pyvera to 0.3.2, null/missing value protection (#25041)
jlrgraham Jul 9, 2019
96b3033
Add radiotherm CT80 current humidity support (#25024)
zombielinux Jul 9, 2019
9e810e9
Add config flow support to Geolocation (#25046)
bachya Jul 9, 2019
cc08ce4
Update tuyaha to 0.0.2 to catch API exceptions (#25050)
PaulAnnekov Jul 9, 2019
7b2d9c4
Added marker sensor to CUPS integration (#25037)
Matte23 Jul 10, 2019
84b343c
Remove myself as codeowner (#25043)
cdce8p Jul 10, 2019
bb02e24
[climate] Bugfix honeywell misleading error message (#25048)
zxdavb Jul 10, 2019
6fe93d2
Add Sonos debug logging (#25063)
amelchio Jul 10, 2019
7b30f40
Updated frontend to 20190710.0
balloob Jul 10, 2019
2f9b2df
Update translations
balloob Jul 10, 2019
59c01df
Avoid flooding steam API (#23941)
Swamp-Ig Jul 10, 2019
2321b14
Add check_config helper (#24557)
kellerza Jul 10, 2019
e016f45
bump zha-quirks version (#25059)
dmulcahey Jul 10, 2019
9f41011
Fix broken test in Python 3.7 (#25067)
balloob Jul 10, 2019
acdcfc4
Fix for Sonos debug logging (#25064)
amelchio Jul 10, 2019
f6114c7
Bump up ZHA dependencies. (#25062)
Adminiuga Jul 10, 2019
a5aa7ed
Add support for World Wide Lightning Location Network (#25001)
bachya Jul 10, 2019
39a1fa2
SMA catch error (#25045)
kellerza Jul 10, 2019
6856ac4
Change phrases in the logbook component for persons and binary_sensor…
Martijn02 Jul 10, 2019
a67182a
Make sure volume level is valid when incrementing/decrementing (#25061)
JeffLIrion Jul 10, 2019
d777884
Complete OPERATION_MODES (#25069)
monte-monte Jul 10, 2019
25c175f
Add websocket API command for Z-Wave network status (#25066)
cgarwood Jul 11, 2019
a028055
Correctly store removed entities for restore state (#25073)
balloob Jul 11, 2019
c782ae6
Restore automation last_triggered as datetime & fix test (#24951)
pnbruckner Jul 11, 2019
3163630
pylint
balloob Jul 11, 2019
2a3fb76
Version bump to 0.97.0dev0
balloob Jul 11, 2019
c6a0f3c
Rewrite calendar component (#24950)
MartinHjelmare Jul 11, 2019
4f3f6dd
Change unique_id formula for Notion entities (#25076)
bachya Jul 11, 2019
2d51d72
Do not reverse open/close calls (#24879)
balloob Jul 11, 2019
5962976
Update azure-pipelines-release.yml for Azure Pipelines
pvizeli Jul 11, 2019
c9134dc
Update azure-pipelines-release.yml for Azure Pipelines
pvizeli Jul 11, 2019
c08d8f4
Update azure-pipelines-release.yml for Azure Pipelines
pvizeli Jul 11, 2019
e58fb96
Guard module being None (#25077)
balloob Jul 11, 2019
a274c32
Remove monitored conditions from syncthru (#25052)
nielstron Jul 11, 2019
aa59a7c
Update azure-pipelines-wheels.yml for Azure Pipelines
pvizeli Jul 11, 2019
42afdb2
Add climate related services to Homematic IP Cloud (#25079)
SukramJ Jul 11, 2019
a1f7500
Fix powercontrol media player alexa (#25080)
pvizeli Jul 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 23 additions & 15 deletions homeassistant/components/n26/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

import voluptuous as vol

from n26 import api as n26_api, config as n26_config

from homeassistant.const import (
CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME)
import homeassistant.helpers.config_validation as cv
Expand All @@ -18,12 +20,12 @@

# define configuration parameters
CONFIG_SCHEMA = vol.Schema({
DOMAIN: vol.Schema({
DOMAIN: vol.All(cv.ensure_list, [{
vol.Required(CONF_USERNAME): cv.string,
vol.Required(CONF_PASSWORD): cv.string,
vol.Optional(CONF_SCAN_INTERVAL,
default=DEFAULT_SCAN_INTERVAL): cv.time_period,
}),
}])
}, extra=vol.ALLOW_EXTRA)

N26_COMPONENTS = [
Expand All @@ -34,24 +36,30 @@

def setup(hass, config):
"""Set up N26 Component."""
user = config[DOMAIN][CONF_USERNAME]
password = config[DOMAIN][CONF_PASSWORD]
acc_list = config[DOMAIN]

api_data_list = []

for acc in acc_list:
user = acc[CONF_USERNAME]
password = acc[CONF_PASSWORD]

api = n26_api.Api(n26_config.Config(user, password))

from n26 import api, config as api_config
api = api.Api(api_config.Config(user, password))
from requests import HTTPError
try:
api.get_token()
except HTTPError as err:
_LOGGER.error(str(err))
return False

from requests import HTTPError
try:
api.get_token()
except HTTPError as err:
_LOGGER.error(str(err))
return False
api_data = N26Data(api)
api_data.update()

api_data = N26Data(api)
api_data.update()
api_data_list.append(api_data)

hass.data[DOMAIN] = {}
hass.data[DOMAIN][DATA] = api_data
hass.data[DOMAIN][DATA] = api_data_list

# Load components for supported devices
for component in N26_COMPONENTS:
Expand Down
20 changes: 13 additions & 7 deletions homeassistant/components/n26/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,20 @@
def setup_platform(
hass, config, add_entities, discovery_info=None):
"""Set up the N26 sensor platform."""
api_data = hass.data[DOMAIN][DATA]
api_list = hass.data[DOMAIN][DATA]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a guard clause here that checks if discovery_info is None and return if so.


sensor_entities = [N26Account(api_data)]
if api_list is None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The api_list can never be None. We can remove this.

return

for card in api_data.cards:
sensor_entities.append(N26Card(api_data, card))
sensor_entities = []
for api_data in api_list:
sensor_entities.append(N26Account(api_data))

for space in api_data.spaces["spaces"]:
sensor_entities.append(N26Space(api_data, space))
for card in api_data.cards:
sensor_entities.append(N26Card(api_data, card))

for space in api_data.spaces["spaces"]:
sensor_entities.append(N26Space(api_data, space))

add_entities(sensor_entities)

Expand Down Expand Up @@ -204,7 +209,8 @@ def update(self) -> None:
@property
def unique_id(self):
"""Return the unique ID of the entity."""
return "space_{}".format(self._space["name"].lower())
return "space_{}_{}".format(self._data.balance["iban"][-4:],
self._space["name"].lower())

@property
def name(self) -> str:
Expand Down
10 changes: 7 additions & 3 deletions homeassistant/components/n26/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@
def setup_platform(
hass, config, add_entities, discovery_info=None):
"""Set up the N26 switch platform."""
api_data = hass.data[DOMAIN][DATA]
api_list = hass.data[DOMAIN][DATA]

if api_list is None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

return

switch_entities = []
for card in api_data.cards:
switch_entities.append(N26CardSwitch(api_data, card))
for api_data in api_list:
for card in api_data.cards:
switch_entities.append(N26CardSwitch(api_data, card))

add_entities(switch_entities)

Expand Down