StarLine integration (#27197)
* Device Tracker works * Device Tracker works * Binary Sensor * Sensor * Lock * Switch and service * New switches * Update interval options * WIP * Translation errors * Check online state * WIP * Move to aiohttp * Some checks * CI * CI * .coveragerc * Black * icon_for_signal_level test * update_interval renamed to scan_interval * async logic * Fix cookie read * Requirement starline * Reformat * Requirements updated * ConfigEntryNotReady * Requirement starline * Lint fix * Requirement starline * available status * Translations * Expiration to config * CI * Linter fix * Small renaming * Update slnet token * Starline version bump * Fix updates * Black * Small fix * Removed unused fields * CI * set_scan_interval service * deps updated * Horn switch * Starline lib updated * Starline lib updated * Black * Support multiple integrations * Review * async_will_remove_from_hass * Deps updated * Test config flow * Requirements * CI * Review * Review * Review * Review * Review * CI * pylint fix * Review * Support "mayak" devices * Icons removed * Removed options_flow * Removed options_flow test * Removed options_flow test
This commit is contained in:
parent
c21650473a
commit
a37260faa9
23 changed files with 1179 additions and 0 deletions
|
@ -44,3 +44,15 @@ def test_battery_icon():
|
|||
postfix = ""
|
||||
assert iconbase + postfix == icon_for_battery_level(level, False)
|
||||
assert iconbase + postfix_charging == icon_for_battery_level(level, True)
|
||||
|
||||
|
||||
def test_signal_icon():
|
||||
"""Test icon generator for signal sensor."""
|
||||
from homeassistant.helpers.icon import icon_for_signal_level
|
||||
|
||||
assert icon_for_signal_level(None) == "mdi:signal-cellular-outline"
|
||||
assert icon_for_signal_level(0) == "mdi:signal-cellular-outline"
|
||||
assert icon_for_signal_level(5) == "mdi:signal-cellular-1"
|
||||
assert icon_for_signal_level(40) == "mdi:signal-cellular-2"
|
||||
assert icon_for_signal_level(80) == "mdi:signal-cellular-3"
|
||||
assert icon_for_signal_level(100) == "mdi:signal-cellular-3"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue