Skip to content

Commit

Permalink
Merge pull request #40 from sbryfcz/Bug-fixes
Browse files Browse the repository at this point in the history
Cleanup and Bug Fixes
  • Loading branch information
sbryfcz authored Oct 22, 2020
2 parents 3004aab + e9380f5 commit 7f0204b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"editor.formatOnSave": false
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.12.0] - 2020-10-22

### Added

### Changed
- Resolved a few dependencies vulnerabilities
- Fixed reported scaling issue

## [0.11.0] - 2020-05-28

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ These options let you override the default icon, commands, devices, and visibili
| ----------------- | ------- | ------------ | ------------------------------------------- | ------------------- |
| command | string | **Optional** | The device command to use | See below |
| device | string | **Optional** | The harmony device name to send the command to | See below |
| icon | string | **Optional** | The icon to display for the button | See below |
| icon | string | **Optional** | The icon to display for the button (ex. `mdi:` + http://materialdesignicons.com/) | See below |
| hide | string | **Optional** | Should this button be hidden | false |
| color | string | **Optional** | A css string to represent the color ex. '#ff0000' | |

Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "harmony-card",
"version": "0.11.0",
"version": "0.12.0",
"description": "Lovelace harmony-card",
"keywords": [
"home-assistant",
Expand Down Expand Up @@ -51,8 +51,8 @@
},
"scripts": {
"start": "rollup -c --watch",
"build": "npm run lint && npm run rollup",
"build": "npm run rollup",
"lint": "eslint src/*.ts",
"rollup": "rollup -c"
}
}
}
2 changes: 1 addition & 1 deletion src/const.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HarmonyButtonConfig } from "./types";

export const CARD_VERSION = '0.11.0';
export const CARD_VERSION = '0.12.0';

export const DEFAULT_BUTTONS: { [key: string]: HarmonyButtonConfig } = {
'volume_down': {
Expand Down
5 changes: 4 additions & 1 deletion src/harmony-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,10 @@ export class HarmonyCard extends LitElement {
private computeStyles() {
var scale = this._config?.scale || 1;

return styleMap({ '--mmp-unit': `${40 * scale}px` });
return styleMap({
'--mmp-unit': `${40 * scale}px`,
'--mdc-icon-size': `${24 * scale}px`
});
}

private computeButtonConfig(config: HarmonyCardConfig, currentActivityConfig?: HarmonyActivityConfig): { [key: string]: HarmonyButtonConfig } {
Expand Down

0 comments on commit 7f0204b

Please sign in to comment.