Skip to content

Commit

Permalink
Rename "CO2 Signal" display name to Electricity Maps for consistency (#…
Browse files Browse the repository at this point in the history
…130242)

* Update strings.json for Electricity Maps

* Update strings.json

* Update config_flow.py

* Update test_config_flow.py

* Fix test
  • Loading branch information
corradio authored Nov 11, 2024
1 parent c96f1c8 commit e797149
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion homeassistant/components/co2signal/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async def _validate_and_create(
)

return self.async_create_entry(
title=get_extra_name(data) or "CO2 Signal",
title=get_extra_name(data) or "Electricity Maps",
data=data,
)

Expand Down
4 changes: 2 additions & 2 deletions tests/components/co2signal/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def test_form_home(hass: HomeAssistant) -> None:
await hass.async_block_till_done()

assert result2["type"] is FlowResultType.CREATE_ENTRY
assert result2["title"] == "CO2 Signal"
assert result2["title"] == "Electricity Maps"
assert result2["data"] == {
"api_key": "api_key",
}
Expand Down Expand Up @@ -185,7 +185,7 @@ async def test_form_error_handling(
await hass.async_block_till_done()

assert result["type"] is FlowResultType.CREATE_ENTRY
assert result["title"] == "CO2 Signal"
assert result["title"] == "Electricity Maps"
assert result["data"] == {
"api_key": "api_key",
}
Expand Down

0 comments on commit e797149

Please sign in to comment.