mirror of
https://github.com/home-assistant/core.git
synced 2026-09-26 01:11:51 -04:00
Change range for getting all columns in Google Sheets (#181007)
This commit is contained in:
@@ -72,7 +72,7 @@ def _append_to_sheet(call: ServiceCall, entry: GoogleSheetsConfigEntry) -> None:
|
||||
client = Client(Credentials(entry.data[CONF_TOKEN][CONF_ACCESS_TOKEN])) # type: ignore[no-untyped-call]
|
||||
sheet = client.open_by_key(entry.unique_id)
|
||||
worksheet = _get_worksheet(sheet, call.data.get(WORKSHEET))
|
||||
columns: list[str] = next(iter(worksheet.get_values("A1:ZZ1")), [])
|
||||
columns: list[str] = next(iter(worksheet.get_values("1:1")), [])
|
||||
add_created_column = call.data[ADD_CREATED_COLUMN]
|
||||
now = str(dt_util.now())
|
||||
rows = []
|
||||
|
||||
@@ -347,6 +347,7 @@ async def test_append_sheet_created_column_uses_configured_time_zone(
|
||||
|
||||
rows_data = mock_worksheet.append_rows.call_args[0][0]
|
||||
assert rows_data[0] == ["bar", "2024-01-15 23:30:45.123456+11:00"]
|
||||
mock_worksheet.get_values.assert_called_once_with("1:1")
|
||||
|
||||
|
||||
async def test_get_sheet(
|
||||
|
||||
Reference in New Issue
Block a user