MCPcopy Index your code

hub / github.com/FaserF/ha-db_infoscreen / functions

Functions338 in github.com/FaserF/ha-db_infoscreen

Methodnative_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
Methodnative_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
Methodnative_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
Methodnative_value
Return the calculated punctuality percentage.
custom_components/db_infoscreen/sensor.py:582
Functionnow
Return current timezone-aware datetime.
tests/conftest.py:240
Functionparse_datetime
Parse ISO datetime string to timezone-aware datetime.
tests/conftest.py:228
Functionpatch_coordinator
Patch DataUpdateCoordinator to prevent background tasks and simplify tests.
tests/test_coordinator.py:32
Functionpatch_coordinator
()
tests/test_pause_updates.py:18
Functionraise_429
(*_args, **_kwargs)
tests/test_coordinator.py:153
Functionreal_coordinator
Return a minimal real coordinator with departure_history for _update_history tests.
tests/test_statistics.py:20
Functionsensor_files
Return the paths to sensor files.
tests/test_translations.py:60
Functionsetup_frame_helper
Set up frame helper for the test session.
tests/conftest.py:313
Functionside_effect_500
(*args, **kwargs)
tests/test_stability.py:46
Functionside_effect_error
(*args, **kwargs)
tests/test_stability.py:37
Functionside_effect_malformed
(*args, **kwargs)
tests/test_stability.py:64
Functionsimple_serializer
JSON serializer for objects not serializable by default json code.
custom_components/db_infoscreen/utils.py:101
Functionstrings_path
Return the path to strings.json.
tests/test_translations.py:24
Functiontest_all_translation_keys_referenced
Test that all translation keys used in code are present in strings.json.
tests/test_translations.py:250
Functiontest_async_get_station_candidates_direct_match
Test direct station match (200 OK) via JSON API.
tests/test_station_candidates.py:54
Functiontest_async_get_station_candidates_dot_encoding
Test that station names ending with a dot are encoded as %2E.
tests/test_station_candidates.py:198
Functiontest_async_get_station_candidates_error
Test graceful failure when all lookups fail.
tests/test_station_candidates.py:181
Functiontest_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
Functiontest_async_get_station_candidates_json_success
Test successful station candidate fetching via JSON API.
tests/test_station_candidates.py:15
Functiontest_async_get_stations_download
Test downloading stations when not cached.
tests/test_autocomplete.py:21
Functiontest_async_get_stations_persistent_cache
Test loading stations from persistent cache.
tests/test_autocomplete.py:72
Methodtest_beta_to_beta
(self, mock_git)
tests/test_version_manager.py:70
Methodtest_beta_to_stable
(self, mock_git)
tests/test_version_manager.py:78
Functiontest_calendar_event_generation
Test calendar event generation with duration, walk time, filtering and links.
tests/test_calendar.py:13
Functiontest_config_flow_keys_in_strings
Test that all keys used in config_flow.py are in strings.json.
tests/test_translations.py:129
Functiontest_config_flow_schema_has_paused
Test that the config flow details schema contains the paused option.
tests/test_pause_updates.py:94
Functiontest_coordinator_429_counts_as_api_fetch
Test that 429 responses throttle the next local update tick.
tests/test_coordinator.py:131
Functiontest_coordinator_429_exception_counts_as_api_fetch
Test that 429 exception (aiohttp.ClientResponseError) throttled updates.
tests/test_coordinator.py:145
Functiontest_coordinator_alternative_connections
Test alternative connections are generated for same-destination trains.
tests/test_coordinator.py:468
Functiontest_coordinator_data_source_params
Test that data source mapping works.
tests/test_coordinator.py:91
Functiontest_coordinator_exclude_cancelled
Test excluding cancelled trains.
tests/test_coordinator.py:189
Functiontest_coordinator_favorite_trains_filter
Test that departures are filtered by favorite trains.
tests/test_coordinator.py:520
Functiontest_coordinator_handles_api_errors
Test that the coordinator handles API errors gracefully without crashing.
tests/test_stability.py:32
Functiontest_coordinator_handles_malformed_json
Test handling of invalid JSON response.
tests/test_stability.py:60
Functiontest_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
Functiontest_coordinator_occupancy
Test parsing occupancy data.
tests/test_coordinator.py:230
Functiontest_coordinator_options_in_url
Test that options are correctly correctly added to the URL.
tests/test_coordinator.py:79
Functiontest_coordinator_pause_updates
Test that updates can be paused in the coordinator.
tests/test_pause_updates.py:50
Functiontest_coordinator_platform_change
Test platform change detection.
tests/test_coordinator.py:264
Functiontest_coordinator_qos
Test QoS parsing and facilities extraction.
tests/test_coordinator.py:348
Functiontest_coordinator_retry
Test retry logic on transient failures.
tests/test_coordinator.py:559
Functiontest_coordinator_retry_max_failure
Test that it returns cached data after max retries fail.
tests/test_coordinator.py:606
Functiontest_coordinator_route_details
Test route details parsing.
tests/test_coordinator.py:389
Functiontest_coordinator_trip_id
Test trip ID parsing.
tests/test_coordinator.py:434
Functiontest_coordinator_update_data
Test updating data.
tests/test_coordinator.py:107
Functiontest_coordinator_url_encoding
Test correctly encoding of station and via parameters.
tests/test_coordinator.py:67
Functiontest_coordinator_wagon_order
Test wagon order and sector extraction.
tests/test_coordinator.py:298
Functiontest_custom_text_view_template
Test that next_departures_text correctly formats with custom template.
tests/test_text_sensor_fix.py:51
Functiontest_deduplication_custom_key_kvv
Test deduplication with custom key for KVV (as requested in #116).
tests/test_deduplication.py:82
Functiontest_deduplication_default_key
Test deduplication with default key (DB IRIS style).
tests/test_deduplication.py:42
Functiontest_deduplication_fallback
Test deduplication fallback when key resolving yields empty string.
tests/test_deduplication.py:113
Functiontest_defective_facilities_binary_sensor_attribute
Test that the elevator binary sensor publishes defective facilities.
tests/test_messages_and_facilities.py:53
Methodtest_dev_to_beta
(self, mock_git)
tests/test_version_manager.py:94
Functiontest_documentation_links
Main test entry point for link validation.
tests/test_docs_links.py:113
Functiontest_elevator_sensor_general_message
(mock_coordinator, mock_config_entry)
tests/test_binary_sensor.py:47
Functiontest_elevator_sensor_keywords
(mock_coordinator, mock_config_entry)
tests/test_binary_sensor.py:60
Functiontest_elevator_sensor_no_issues
(mock_coordinator, mock_config_entry)
tests/test_binary_sensor.py:22
Functiontest_elevator_sensor_platform_match
(mock_coordinator, mock_config_entry)
tests/test_binary_sensor.py:28
Functiontest_extra_translation_sections
Test consistency for extra translation sections like repairs, train_types.
tests/test_translations.py:209
Functiontest_find_station_matches
Test the matching logic (exact, starts-with, contains, fuzzy).
tests/test_autocomplete.py:51
Functiontest_form_create_entry
Test that validating the user input works and creates an entry (multi-step).
tests/test_config_flow.py:35
Functiontest_form_create_entry_advanced
Test that validating advanced user input works, including excluded_directions.
tests/test_config_flow.py:94
Functiontest_form_multiple_matches
Test the flow when multiple station matches are found.
tests/test_config_flow.py:140
Functiontest_form_no_matches_manual_override
Test manual entry override when no matches found.
tests/test_config_flow.py:179
Functiontest_form_unreachable_servers
Test error keys returned when official or FaserF servers are unreachable.
tests/test_config_flow.py:235
Functiontest_form_user
Test we get the form.
tests/test_config_flow.py:18
Functiontest_full_options_lifecycle
Test a full lifecycle of editing multiple option pages.
tests/test_options_flow_comprehensive.py:19
Methodtest_get_current_version_fallback
(self, mock_file, mock_exists, mock_git)
tests/test_version_manager.py:47
Methodtest_get_current_version_git_invalid_ignored
(self, mock_git)
tests/test_version_manager.py:38
Methodtest_get_current_version_logical_sorting
(self, mock_git)
tests/test_version_manager.py:23
Methodtest_get_current_version_stable_over_beta_same_patch
(self, mock_git)
tests/test_version_manager.py:31
Functiontest_hassio_discovery_already_installed
Test Hass.io discovery flow when addon is already installed.
tests/test_config_flow.py:267
Functiontest_hassio_discovery_not_installed
Test Hass.io discovery flow when addon is not installed.
tests/test_config_flow.py:306
Functiontest_input_sanitization
Test that special characters in station names don't crash or cause injection-like issues.
tests/test_stability.py:79
Functiontest_large_response_handling
Test handling of very large responses (DoS protection simulation).
tests/test_stability.py:93
Functiontest_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
Functiontest_leave_now_immediate
Test 0 state when time is up.
tests/test_leave_alarm.py:46
Functiontest_leave_now_no_data
Test sensor with no data.
tests/test_leave_alarm.py:61
Functiontest_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
Functiontest_leave_now_sensor_logic
Test the calculation logic of the Leave Now sensor.
tests/test_leave_alarm.py:21
Functiontest_live_binary_sensors
Test binary sensors attributes with live data.
tests/test_live_api.py:226
Functiontest_live_calendar_events
Test that calendar event generation matches live coordinator configuration.
tests/test_live_api.py:251
Functiontest_live_data_structure
Test that the live data contains required fields and station messages.
tests/test_live_api.py:126
Functiontest_live_filtering_options
Test various filtering features against the live API response.
tests/test_live_api.py:146
Functiontest_live_sensor_entities
Test that sensor attributes and states map correctly with live data.
tests/test_live_api.py:202
Functiontest_manual_entry
Test manual entry path.
tests/test_config_flow_search.py:154
Functiontest_markdown_paragraph_spacing
Verify that markdown files have proper spacing between elements.
tests/test_docs_formatting.py:21
Functiontest_next_departures_text_diverse_keys
Test that next_departures_text correctly picks up time from diverse keys.
tests/test_text_sensor_fix.py:17
Functiontest_options_flow
Test options flow menu.
tests/test_config_flow.py:216
Functiontest_options_flow_schema_has_paused
Test that the options flow general options schema contains the paused option.
tests/test_pause_updates.py:107
Functiontest_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
Functiontest_parse_dbf_multiple_choices_empty
Test parsing with irrelevant content.
tests/test_station_candidates.py:173
Functiontest_past_departure_filtering
Test that departures in the past are filtered out.
tests/test_feature_updates.py:20
Functiontest_platforms_different_fetch_urls
Verify that different platforms result in unique fetch URLs for caching.
tests/test_via_stations_logic.py:205
Functiontest_punctuality_sensor_calculation
Test the statistics calculation logic.
tests/test_statistics.py:38
Functiontest_punctuality_sensor_empty
Test statistics when history is empty.
tests/test_statistics.py:77
← previousnext →201–300 of 338, ranked by callers