Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/FaserF/ha-db_infoscreen
/ functions
Functions
338 in github.com/FaserF/ha-db_infoscreen
⨍
Functions
338
◇
Types & classes
29
↳
Endpoints
13
Method
native_value
Return the main state of the sensor (e.g., '10:30' or '10:30 +5'). Calculates the state from the first entry in the filtered data.
custom_components/db_infoscreen/sensor.py:122
Method
native_value
Return the current watchdog state. Shows the name and delay of the previous station for the next train.
custom_components/db_infoscreen/sensor.py:352
Method
native_value
Return the number of minutes until the user must leave. Returns 'Leave now!' if the walk time has already passed.
custom_components/db_infoscreen/sensor.py:508
Method
native_value
Return the calculated punctuality percentage.
custom_components/db_infoscreen/sensor.py:582
Function
now
Return current timezone-aware datetime.
tests/conftest.py:240
Function
parse_datetime
Parse ISO datetime string to timezone-aware datetime.
tests/conftest.py:228
Function
patch_coordinator
Patch DataUpdateCoordinator to prevent background tasks and simplify tests.
tests/test_coordinator.py:32
Function
patch_coordinator
()
tests/test_pause_updates.py:18
Function
raise_429
(*_args, **_kwargs)
tests/test_coordinator.py:153
Function
real_coordinator
Return a minimal real coordinator with departure_history for _update_history tests.
tests/test_statistics.py:20
Function
sensor_files
Return the paths to sensor files.
tests/test_translations.py:60
Function
setup_frame_helper
Set up frame helper for the test session.
tests/conftest.py:313
Function
side_effect_500
(*args, **kwargs)
tests/test_stability.py:46
Function
side_effect_error
(*args, **kwargs)
tests/test_stability.py:37
Function
side_effect_malformed
(*args, **kwargs)
tests/test_stability.py:64
Function
simple_serializer
JSON serializer for objects not serializable by default json code.
custom_components/db_infoscreen/utils.py:101
Function
strings_path
Return the path to strings.json.
tests/test_translations.py:24
Function
test_all_translation_keys_referenced
Test that all translation keys used in code are present in strings.json.
tests/test_translations.py:250
Function
test_async_get_station_candidates_direct_match
Test direct station match (200 OK) via JSON API.
tests/test_station_candidates.py:54
Function
test_async_get_station_candidates_dot_encoding
Test that station names ending with a dot are encoded as %2E.
tests/test_station_candidates.py:198
Function
test_async_get_station_candidates_error
Test graceful failure when all lookups fail.
tests/test_station_candidates.py:181
Function
test_async_get_station_candidates_html_fallback
Test fallback to HTML parsing when JSON fails or returns 300 with HTML.
tests/test_station_candidates.py:87
Function
test_async_get_station_candidates_json_success
Test successful station candidate fetching via JSON API.
tests/test_station_candidates.py:15
Function
test_async_get_stations_download
Test downloading stations when not cached.
tests/test_autocomplete.py:21
Function
test_async_get_stations_persistent_cache
Test loading stations from persistent cache.
tests/test_autocomplete.py:72
Method
test_beta_to_beta
(self, mock_git)
tests/test_version_manager.py:70
Method
test_beta_to_stable
(self, mock_git)
tests/test_version_manager.py:78
Function
test_calendar_event_generation
Test calendar event generation with duration, walk time, filtering and links.
tests/test_calendar.py:13
Function
test_config_flow_keys_in_strings
Test that all keys used in config_flow.py are in strings.json.
tests/test_translations.py:129
Function
test_config_flow_schema_has_paused
Test that the config flow details schema contains the paused option.
tests/test_pause_updates.py:94
Function
test_coordinator_429_counts_as_api_fetch
Test that 429 responses throttle the next local update tick.
tests/test_coordinator.py:131
Function
test_coordinator_429_exception_counts_as_api_fetch
Test that 429 exception (aiohttp.ClientResponseError) throttled updates.
tests/test_coordinator.py:145
Function
test_coordinator_alternative_connections
Test alternative connections are generated for same-destination trains.
tests/test_coordinator.py:468
Function
test_coordinator_data_source_params
Test that data source mapping works.
tests/test_coordinator.py:91
Function
test_coordinator_exclude_cancelled
Test excluding cancelled trains.
tests/test_coordinator.py:189
Function
test_coordinator_favorite_trains_filter
Test that departures are filtered by favorite trains.
tests/test_coordinator.py:520
Function
test_coordinator_handles_api_errors
Test that the coordinator handles API errors gracefully without crashing.
tests/test_stability.py:32
Function
test_coordinator_handles_malformed_json
Test handling of invalid JSON response.
tests/test_stability.py:60
Function
test_coordinator_missing_raw_data_without_fetch_returns_last_valid
Test that throttled local ticks do not fetch again without raw cache data.
tests/test_coordinator.py:169
Function
test_coordinator_occupancy
Test parsing occupancy data.
tests/test_coordinator.py:230
Function
test_coordinator_options_in_url
Test that options are correctly correctly added to the URL.
tests/test_coordinator.py:79
Function
test_coordinator_pause_updates
Test that updates can be paused in the coordinator.
tests/test_pause_updates.py:50
Function
test_coordinator_platform_change
Test platform change detection.
tests/test_coordinator.py:264
Function
test_coordinator_qos
Test QoS parsing and facilities extraction.
tests/test_coordinator.py:348
Function
test_coordinator_retry
Test retry logic on transient failures.
tests/test_coordinator.py:559
Function
test_coordinator_retry_max_failure
Test that it returns cached data after max retries fail.
tests/test_coordinator.py:606
Function
test_coordinator_route_details
Test route details parsing.
tests/test_coordinator.py:389
Function
test_coordinator_trip_id
Test trip ID parsing.
tests/test_coordinator.py:434
Function
test_coordinator_update_data
Test updating data.
tests/test_coordinator.py:107
Function
test_coordinator_url_encoding
Test correctly encoding of station and via parameters.
tests/test_coordinator.py:67
Function
test_coordinator_wagon_order
Test wagon order and sector extraction.
tests/test_coordinator.py:298
Function
test_custom_text_view_template
Test that next_departures_text correctly formats with custom template.
tests/test_text_sensor_fix.py:51
Function
test_deduplication_custom_key_kvv
Test deduplication with custom key for KVV (as requested in #116).
tests/test_deduplication.py:82
Function
test_deduplication_default_key
Test deduplication with default key (DB IRIS style).
tests/test_deduplication.py:42
Function
test_deduplication_fallback
Test deduplication fallback when key resolving yields empty string.
tests/test_deduplication.py:113
Function
test_defective_facilities_binary_sensor_attribute
Test that the elevator binary sensor publishes defective facilities.
tests/test_messages_and_facilities.py:53
Method
test_dev_to_beta
(self, mock_git)
tests/test_version_manager.py:94
Function
test_documentation_links
Main test entry point for link validation.
tests/test_docs_links.py:113
Function
test_elevator_sensor_general_message
(mock_coordinator, mock_config_entry)
tests/test_binary_sensor.py:47
Function
test_elevator_sensor_keywords
(mock_coordinator, mock_config_entry)
tests/test_binary_sensor.py:60
Function
test_elevator_sensor_no_issues
(mock_coordinator, mock_config_entry)
tests/test_binary_sensor.py:22
Function
test_elevator_sensor_platform_match
(mock_coordinator, mock_config_entry)
tests/test_binary_sensor.py:28
Function
test_extra_translation_sections
Test consistency for extra translation sections like repairs, train_types.
tests/test_translations.py:209
Function
test_find_station_matches
Test the matching logic (exact, starts-with, contains, fuzzy).
tests/test_autocomplete.py:51
Function
test_form_create_entry
Test that validating the user input works and creates an entry (multi-step).
tests/test_config_flow.py:35
Function
test_form_create_entry_advanced
Test that validating advanced user input works, including excluded_directions.
tests/test_config_flow.py:94
Function
test_form_multiple_matches
Test the flow when multiple station matches are found.
tests/test_config_flow.py:140
Function
test_form_no_matches_manual_override
Test manual entry override when no matches found.
tests/test_config_flow.py:179
Function
test_form_unreachable_servers
Test error keys returned when official or FaserF servers are unreachable.
tests/test_config_flow.py:235
Function
test_form_user
Test we get the form.
tests/test_config_flow.py:18
Function
test_full_options_lifecycle
Test a full lifecycle of editing multiple option pages.
tests/test_options_flow_comprehensive.py:19
Method
test_get_current_version_fallback
(self, mock_file, mock_exists, mock_git)
tests/test_version_manager.py:47
Method
test_get_current_version_git_invalid_ignored
(self, mock_git)
tests/test_version_manager.py:38
Method
test_get_current_version_logical_sorting
(self, mock_git)
tests/test_version_manager.py:23
Method
test_get_current_version_stable_over_beta_same_patch
(self, mock_git)
tests/test_version_manager.py:31
Function
test_hassio_discovery_already_installed
Test Hass.io discovery flow when addon is already installed.
tests/test_config_flow.py:267
Function
test_hassio_discovery_not_installed
Test Hass.io discovery flow when addon is not installed.
tests/test_config_flow.py:306
Function
test_input_sanitization
Test that special characters in station names don't crash or cause injection-like issues.
tests/test_stability.py:79
Function
test_large_response_handling
Test handling of very large responses (DoS protection simulation).
tests/test_stability.py:93
Function
test_leave_later_numeric_value
Test that the leave now sensor returns a numeric value when not yet time to leave.
tests/test_leave_alarm_fix.py:47
Function
test_leave_now_immediate
Test 0 state when time is up.
tests/test_leave_alarm.py:46
Function
test_leave_now_no_data
Test sensor with no data.
tests/test_leave_alarm.py:61
Function
test_leave_now_numeric_value
Test that the leave now sensor returns a numeric value (0) instead of a string.
tests/test_leave_alarm_fix.py:17
Function
test_leave_now_sensor_logic
Test the calculation logic of the Leave Now sensor.
tests/test_leave_alarm.py:21
Function
test_live_binary_sensors
Test binary sensors attributes with live data.
tests/test_live_api.py:226
Function
test_live_calendar_events
Test that calendar event generation matches live coordinator configuration.
tests/test_live_api.py:251
Function
test_live_data_structure
Test that the live data contains required fields and station messages.
tests/test_live_api.py:126
Function
test_live_filtering_options
Test various filtering features against the live API response.
tests/test_live_api.py:146
Function
test_live_sensor_entities
Test that sensor attributes and states map correctly with live data.
tests/test_live_api.py:202
Function
test_manual_entry
Test manual entry path.
tests/test_config_flow_search.py:154
Function
test_markdown_paragraph_spacing
Verify that markdown files have proper spacing between elements.
tests/test_docs_formatting.py:21
Function
test_next_departures_text_diverse_keys
Test that next_departures_text correctly picks up time from diverse keys.
tests/test_text_sensor_fix.py:17
Function
test_options_flow
Test options flow menu.
tests/test_config_flow.py:216
Function
test_options_flow_schema_has_paused
Test that the options flow general options schema contains the paused option.
tests/test_pause_updates.py:107
Function
test_parse_dbf_multiple_choices_diverse_links
Test extraction of station links from various HTML patterns including query-based and provider-specific ones.
tests/test_station_candidates.py:149
Function
test_parse_dbf_multiple_choices_empty
Test parsing with irrelevant content.
tests/test_station_candidates.py:173
Function
test_past_departure_filtering
Test that departures in the past are filtered out.
tests/test_feature_updates.py:20
Function
test_platforms_different_fetch_urls
Verify that different platforms result in unique fetch URLs for caching.
tests/test_via_stations_logic.py:205
Function
test_punctuality_sensor_calculation
Test the statistics calculation logic.
tests/test_statistics.py:38
Function
test_punctuality_sensor_empty
Test statistics when history is empty.
tests/test_statistics.py:77
← previous
next →
201–300 of 338, ranked by callers